/*
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */
package net.sf.l2j;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.InputStream;
import java.io.LineNumberReader;
import java.io.OutputStream;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.logging.Logger;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;

import javolution.util.FastList;
import javolution.util.FastMap;
import net.sf.l2j.gameserver.util.FloodProtectorConfig;
import net.sf.l2j.gameserver.util.StringUtil;

public final class Config 
{
	protected static final Logger _log = Logger.getLogger(Config.class.getName());

	public static final String GM_ACCESS_FILE = "./config/administration.properties";
	public static final String ALT_SETTINGS_FILE = "./config/altgame.properties";
	public static final String SIEGE_CONFIGURATION_FILE = "./config/castle_siege.properties";
	public static final String CHAT_FILTER_FILE = "./config/chatfilter.txt";
	public static final String CLANS_CONFIG_FILE = "./config/clans.properties";
	public static final String L2J_CUSTOM = "./config/customs.properties";
	public static final String DEV_CONFIG_FILE = "./config/developers.properties";
	public static final String L2J_MODS = "./config/events.properties";
	public static final String FLOODPROTECTOR_CONFIG_FILE = "./config/flood_protectors.properties";
	public static final String CONFIGURATION_FILE = "./config/gameserver.properties";
	public static final String ID_CONFIG_FILE = "./config/idfactory.properties";
	public static final String LOGIN_CONFIGURATION_FILE = "./config/loginserver.properties";
	public static final String NPC_CONFIG_FILE = "./config/npcs.properties";
	public static final String OPTIONS_FILE = "./config/options.properties";
	public static final String PLAYERS_CONFIG_FILE = "./config/players.properties";
	public static final String RATES_CONFIG_FILE = "./config/rates.properties";
	public static final String TELNET_FILE = "./config/telnet.properties";
	public static final String HEXID_FILE = "./config/hexid.txt";

	public static int MAX_ITEM_IN_PACKET;
	public static final FloodProtectorConfig FLOOD_PROTECTOR_USE_ITEM = new FloodProtectorConfig("UseItemFloodProtector");
	public static final FloodProtectorConfig FLOOD_PROTECTOR_ROLL_DICE = new FloodProtectorConfig("RollDiceFloodProtector");
	public static final FloodProtectorConfig FLOOD_PROTECTOR_FIREWORK = new FloodProtectorConfig("FireworkFloodProtector");
	public static final FloodProtectorConfig FLOOD_PROTECTOR_ITEM_PET_SUMMON = new FloodProtectorConfig("ItemPetSummonFloodProtector");
	public static final FloodProtectorConfig FLOOD_PROTECTOR_HERO_VOICE = new FloodProtectorConfig("HeroVoiceFloodProtector");
	public static final FloodProtectorConfig FLOOD_PROTECTOR_SUBCLASS = new FloodProtectorConfig("SubclassFloodProtector");
	public static final FloodProtectorConfig FLOOD_PROTECTOR_DROP_ITEM = new FloodProtectorConfig("DropItemFloodProtector");
	public static final FloodProtectorConfig FLOOD_PROTECTOR_SERVER_BYPASS = new FloodProtectorConfig("ServerBypassFloodProtector");
	public static final FloodProtectorConfig FLOOD_PROTECTOR_UNK_PACKETS = new FloodProtectorConfig("UnkPacketsFloodProtector");
	public static final FloodProtectorConfig FLOOD_PROTECTOR_CRAFT = new FloodProtectorConfig("CraftFloodProtector");
	public static final FloodProtectorConfig FLOOD_PROTECTOR_MULTISELL = new FloodProtectorConfig("MultiSellFloodProtector");
	public static final FloodProtectorConfig FLOOD_PROTECTOR_WEREHOUSE = new FloodProtectorConfig("WerehouseFloodProtector");
	public static final FloodProtectorConfig FLOOD_PROTECTOR_MISC = new FloodProtectorConfig("MiscFloodProtector");
	public static final FloodProtectorConfig FLOOD_PROTECTOR_CHAT = new FloodProtectorConfig("ChatFloodProtector");
	public static final FloodProtectorConfig FLOOD_PROTECTOR_GLOBAL = new FloodProtectorConfig("GlobalFloodProtector");
	public static final FloodProtectorConfig FLOOD_PROTECTOR_TRADE = new FloodProtectorConfig("TradeFloodProtector");
	public static final FloodProtectorConfig FLOOD_PROTECTOR_POTION = new FloodProtectorConfig("PotionFloodProtector");
	public static final FloodProtectorConfig FLOOD_PROTECTOR_ENCHANT = new FloodProtectorConfig("EnchantFloodProtector");

	public static boolean DEADLOCK_DETECTOR;
	public static int DEADLOCK_CHECK_INTERVAL;
	public static boolean RESTART_ON_DEADLOCK;
	
	public static int ALT_MINIMUM_FALL_HEIGHT;
	public static boolean NEW_CHAR_SPAWN;
	public static int SPAWN_X;
	public static int SPAWN_Y;
	public static int SPAWN_Z;
	
	// ==================================================//
	// Custom configurable //
	// ==================================================//
	public static boolean UNLIM_SHOTS;
	public static int ELIXIRS_REUSE_DELAY;
	public static int MANA_POTION_RES;
	public static boolean ENABLE_MENU;
	public static boolean ALLOW_WITHDRAW_CWH_CMD;
	
	public static boolean ENABLE_SIEGE_REWARD;
	public static int SIEGE_REWARD_ITEM_ID;
	public static int SIEGE_REWARD_ITEM_COUNT;
	
	public static boolean OFFLINE_TRADE_ENABLE;
	public static boolean OFFLINE_CRAFT_ENABLE;
	public static boolean OFFLINE_SET_NAME_COLOR;
	public static int OFFLINE_NAME_COLOR;
	
	public static Pattern CNAME_PATTERN;

	// ==================================================//
	// Npc configs //
	// ==================================================//
	public static boolean SERVICES_MANAGER;
	public static int Service_Npc_Manager_Id;
	public static boolean SERVICE_AUDIT;

	public static boolean Service_Npc_AutoSpawn;
	public static int Service_Spawn_X;
	public static int Service_Spawn_Y;
	public static int Service_Spawn_Z;

	public static boolean USE_PREMIUMSERVICE;
	public static int Service_Premium1_Item_Id;
	public static int Service_Premium1_Item_Count;
	public static float PREMIUM_RATE_XP;
	public static float PREMIUM_RATE_SP;
	public static float PREMIUM_RATE_DROP_SPOIL;
	public static float PREMIUM_RATE_DROP_ITEMS;
	public static float PREMIUM_RATE_DROP_QUEST;
	public static float PREMIUM_RATE_DROP_ITEMS_BY_RAID;
	public static float PREMIUM_RATE_DROP_ADENA;

	public static boolean Service_ClanLvl6;
	public static int Service_CL6_Item_Id;
	public static int Service_CL6_Item_Count;
	public static boolean Service_ClanLvl7;
	public static int Service_CL7_Item_Id;
	public static int Service_CL7_Item_Count;
	public static boolean Service_ClanLvl8;
	public static int Service_CL8_Item_Id;
	public static int Service_CL8_Item_Count;

	public static boolean Service_ClanRep;
	public static int Service_ClanRep_PriceID;
	public static int Service_ClanRep_PriceCount;
	public static int Service_ClanRep_Count;

	public static boolean Service_Noble;
	public static int Service_Noble_PriceID;
	public static int Service_Noble_PriceCount;

	public static boolean Service_ChangeNick;
	public static int Service_ChangeNick_PriceID;
	public static int Service_ChangeNick_PriceCount;

	public static boolean Service_SetSex;
	public static int Service_SetSex_PriceID;
	public static int Service_SetSex_PriceCount;

	public static boolean Service_Premium;
	public static int Service_Premium_PriceID;
	public static int Service_Premium_PriceCount;

	public static boolean Service_Nick_Color;
	public static int Service_Nick_Color_Time;
	public static int Service_Nick_Color_PriceID;
	public static int Service_Nick_Color_Count;
	public static String[] Service_Nick_Color_List;

	public static boolean CHAMPION_ENABLE;
	public static String CHAMPION_RED_TITLE;
	public static String CHAMPION_BLUE_TITLE;
	public static int CHAMPION_FREQUENCY_RED;
	public static int CHAMP_MIN_LVL_RED;
	public static int CHAMP_MAX_LVL_RED;
	public static int CHAMPION_HP_RED;
	public static int CHAMPION_REWARDS_RED;
	public static int CHAMPION_ADENAS_REWARDS_RED;
	public static float CHAMPION_HP_REGEN_RED;
	public static float CHAMPION_ATK_RED;
	public static float CHAMPION_DEF_RED;
	public static float CHAMPION_SPD_ATK_RED;
	public static int CHAMPION_REWARD_RED;
	public static int CHAMPION_REWARD_ID_RED;
	public static int CHAMPION_REWARD_QTY_RED;
	public static int CHAMPION_FREQUENCY_BLUE;
	public static int CHAMP_MIN_LVL_BLUE;
	public static int CHAMP_MAX_LVL_BLUE;
	public static int CHAMPION_HP_BLUE;
	public static int CHAMPION_REWARDS_BLUE;
	public static int CHAMPION_ADENAS_REWARDS_BLUE;
	public static float CHAMPION_HP_REGEN_BLUE;
	public static float CHAMPION_ATK_BLUE;
	public static float CHAMPION_DEF_BLUE;
	public static float CHAMPION_SPD_ATK_BLUE;
	public static int CHAMPION_REWARD_BLUE;
	public static int CHAMPION_REWARD_ID_BLUE;
	public static int CHAMPION_REWARD_QTY_BLUE;

	public static boolean SHOW_NPC_CREST;
	public static boolean SET_AGRO_COLOR_TITLE;

	public static int Antharas_Wait_Time;
	public static int Valakas_Wait_Time;
	public static int Interval_Of_Antharas_Spawn;
	public static int Random_Of_Antharas_Spawn;
	public static int Interval_Of_Valakas_Spawn;
	public static int Random_Of_Valakas_Spawn;
	public static int Interval_Of_Baium_Spawn;
	public static int Random_Of_Baium_Spawn;
	public static int Interval_Of_Core_Spawn;
	public static int Random_Of_Core_Spawn;
	public static int Interval_Of_Orfen_Spawn;
	public static int Random_Of_Orfen_Spawn;
	public static int Interval_Of_QueenAnt_Spawn;
	public static int Random_Of_QueenAnt_Spawn;
	public static int Interval_Of_Zaken_Spawn;
	public static int Random_Of_Zaken_Spawn;
	public static int Interval_Of_Frintezza_Spawn;
	public static int Random_Of_Frintezza_Spawn;
	public static int Interval_Of_Sailren_Spawn;
	public static int Random_Of_Sailren_Spawn;
	public static int HPH_FIXINTERVALOFHALTER;
	public static int HPH_RANDOMINTERVALOFHALTER;
	public static int HPH_APPTIMEOFHALTER;
	public static int HPH_ACTIVITYTIMEOFHALTER;
	public static int HPH_FIGHTTIMEOFHALTER;
	public static int HPH_CALLROYALGUARDHELPERCOUNT;
	public static int HPH_CALLROYALGUARDHELPERINTERVAL;
	public static int HPH_INTERVALOFDOOROFALTER;
	public static int HPH_TIMEOFLOCKUPDOOROFALTAR;
	public static boolean FWS_ENABLESINGLEPLAYER;
	public static int FWS_FIXINTERVALOFSAILRENSPAWN;
	public static int FWS_RANDOMINTERVALOFSAILRENSPAWN;
	public static int FWS_INTERVALOFNEXTMONSTER;
	public static int FWS_ACTIVITYTIMEOFMOBS;

	public static float BUFF_TIME_MULTIPLIER;
	public static float SPIRIT_TIME_MULTIPLIER;
	public static float DANCE_TIME_MULTIPLIER;
	public static int BUFF_INVUL_ID;
	public static boolean AUTO_LOOT;
	public static boolean AUTO_LOOT_RAID;
	public static boolean AUTO_LOOT_HERBS;
	public static boolean AUTO_LEARN_SKILLS;
	public static boolean AUTO_LEARN_DIVINE_INSPIRATION;
	public static int ALT_PARTY_RANGE;
	public static int ALT_PARTY_RANGE2;
	public static double ALT_WEIGHT_LIMIT;
	public static boolean ALT_RECOMMEND;
	public static boolean ALT_GAME_DELEVEL;
	public static boolean ALT_GAME_MAGICFAILURES;
	public static boolean ALT_GAME_CANCEL_BOW;
	public static boolean ALT_GAME_CANCEL_CAST;
	public static boolean ALT_GAME_SHIELD_BLOCKS;
	public static boolean ALT_GAME_MOB_ATTACK_AI;
	public static boolean GUARD_ATTACK_AGGRO_MOB;
	public static boolean ALT_GAME_FREIGHTS;
	public static int ALT_GAME_FREIGHT_PRICE;
	public static float ALT_GAME_EXPONENT_XP;
	public static float ALT_GAME_EXPONENT_SP;
	public static boolean ALT_GAME_TIREDNESS;
	public static int SOUL_CRYSTAL_LEVEL_CHANCE;
	public static boolean ALT_GAME_KARMA_PLAYER_CAN_BE_KILLED_IN_PEACEZONE;
	public static boolean ALT_GAME_KARMA_PLAYER_CAN_SHOP;
	public static boolean ALT_GAME_KARMA_PLAYER_CAN_USE_GK;
	public static boolean ALT_GAME_KARMA_PLAYER_CAN_TELEPORT;
	public static boolean ALT_GAME_KARMA_PLAYER_CAN_TRADE;
	public static boolean ALT_GAME_KARMA_PLAYER_CAN_USE_WAREHOUSE;
	public static boolean IS_CRAFTING_ENABLED;
	public static int DWARF_RECIPE_LIMIT;
	public static int COMMON_RECIPE_LIMIT;
	public static boolean ALT_GAME_CREATION;
	public static double ALT_GAME_CREATION_SPEED;
	public static double ALT_GAME_CREATION_XP_RATE;
	public static double ALT_GAME_CREATION_SP_RATE;
	public static boolean ALT_BLACKSMITH_USE_RECIPES;
	public static float ALT_PETS_PHYSICAL_DAMAGE_MULTI;
	public static float ALT_PETS_MAGICAL_DAMAGE_MULTI;
	public static float ALT_NPC_PHYSICAL_DAMAGE_MULTI;
	public static float ALT_NPC_MAGICAL_DAMAGE_MULTI;
	public static boolean ALLOW_CLASS_MASTERS;
	public static boolean SP_BOOK_NEEDED;
	public static boolean ES_SP_BOOK_NEEDED;
	public static boolean ALT_GAME_SKILL_LEARN;
	public static boolean ALT_GAME_SUBCLASS_WITHOUT_QUESTS;
	public static boolean RESTORE_EFFECTS_ON_SUBCLASS_CHANGE;
	public static byte BUFFS_MAX_AMOUNT;
	public static int ALT_CLAN_MEMBERS_FOR_WAR;
	public static int ALT_CLAN_JOIN_DAYS;
	public static int ALT_CLAN_CREATE_DAYS;
	public static int ALT_CLAN_DISSOLVE_DAYS;
	public static int ALT_ALLY_JOIN_DAYS_WHEN_LEAVED;
	public static int ALT_ALLY_JOIN_DAYS_WHEN_DISMISSED;
	public static int ALT_ACCEPT_CLAN_DAYS_WHEN_DISMISSED;
	public static int ALT_CREATE_ALLY_DAYS_WHEN_DISSOLVED;
	public static boolean ALT_GAME_NEW_CHAR_ALWAYS_IS_NEWBIE;
	public static boolean ALT_MEMBERS_CAN_WITHDRAW_FROM_CLANWH;
	public static int ALT_MAX_NUM_OF_CLANS_IN_ALLY;
	public static int ALT_OLY_START_TIME;
	public static int ALT_OLY_MIN;
	public static long ALT_OLY_CPERIOD;
	public static long ALT_OLY_BATTLE;
	public static long ALT_OLY_BWAIT;
	public static long ALT_OLY_IWAIT;
	public static long ALT_OLY_WPERIOD;
	public static long ALT_OLY_VPERIOD;
	public static int ALT_OLY_CLASSED;
	public static int ALT_OLY_NONCLASSED;
	public static int ALT_OLY_BATTLE_REWARD_ITEM;
	public static int ALT_OLY_CLASSED_RITEM_C;
	public static int ALT_OLY_NONCLASSED_RITEM_C;
	public static int ALT_OLY_COMP_RITEM;
	public static int ALT_OLY_GP_PER_POINT;
	public static int ALT_OLY_MIN_POINT_FOR_EXCH;
	public static int ALT_OLY_HERO_POINTS;
	public static String ALT_OLY_RESTRICTED_ITEMS;
	public static List<Integer> LIST_OLY_RESTRICTED_ITEMS = new FastList<Integer>();
	public static int OLY_ENCHANT_LIMIT;
	public static boolean OLYMPIAD_GIVE_ACUMEN_MAGES;
	public static boolean OLYMPIAD_GIVE_HASTE_FIGHTERS;
	public static int OLYMPIAD_ACUMEN_LVL;
	public static int OLYMPIAD_HASTE_LVL;
	public static boolean ALT_OLY_SAME_IP;
	public static int ALT_LOTTERY_PRIZE;
	public static int ALT_LOTTERY_TICKET_PRICE;
	public static float ALT_LOTTERY_5_NUMBER_RATE;
	public static float ALT_LOTTERY_4_NUMBER_RATE;
	public static float ALT_LOTTERY_3_NUMBER_RATE;
	public static int ALT_LOTTERY_2_AND_1_NUMBER_PRIZE;
	public static int CHAT_FILTER_PUNISHMENT_PARAM1;
	public static int CHAT_FILTER_PUNISHMENT_PARAM2;
	public static boolean USE_SAY_FILTER;
	public static String CHAT_FILTER_CHARS;
	public static String CHAT_FILTER_PUNISHMENT;
	public static ArrayList<String> FILTER_LIST = new ArrayList<String>();
	public static boolean ALT_DEV_NO_QUESTS;
	public static boolean ALT_DEV_NO_SPAWNS;
	public static long CH_TELE_FEE_RATIO;
	public static int CH_TELE1_FEE;
	public static int CH_TELE2_FEE;
	public static long CH_ITEM_FEE_RATIO;
	public static int CH_ITEM1_FEE;
	public static int CH_ITEM2_FEE;
	public static int CH_ITEM3_FEE;
	public static long CH_MPREG_FEE_RATIO;
	public static int CH_MPREG1_FEE;
	public static int CH_MPREG2_FEE;
	public static int CH_MPREG3_FEE;
	public static int CH_MPREG4_FEE;
	public static int CH_MPREG5_FEE;
	public static long CH_HPREG_FEE_RATIO;
	public static int CH_HPREG1_FEE;
	public static int CH_HPREG2_FEE;
	public static int CH_HPREG3_FEE;
	public static int CH_HPREG4_FEE;
	public static int CH_HPREG5_FEE;
	public static int CH_HPREG6_FEE;
	public static int CH_HPREG7_FEE;
	public static int CH_HPREG8_FEE;
	public static int CH_HPREG9_FEE;
	public static int CH_HPREG10_FEE;
	public static int CH_HPREG11_FEE;
	public static int CH_HPREG12_FEE;
	public static int CH_HPREG13_FEE;
	public static long CH_EXPREG_FEE_RATIO;
	public static int CH_EXPREG1_FEE;
	public static int CH_EXPREG2_FEE;
	public static int CH_EXPREG3_FEE;
	public static int CH_EXPREG4_FEE;
	public static int CH_EXPREG5_FEE;
	public static int CH_EXPREG6_FEE;
	public static int CH_EXPREG7_FEE;
	public static long CH_SUPPORT_FEE_RATIO;
	public static int CH_SUPPORT1_FEE;
	public static int CH_SUPPORT2_FEE;
	public static int CH_SUPPORT3_FEE;
	public static int CH_SUPPORT4_FEE;
	public static int CH_SUPPORT5_FEE;
	public static int CH_SUPPORT6_FEE;
	public static int CH_SUPPORT7_FEE;
	public static int CH_SUPPORT8_FEE;
	public static long CH_CURTAIN_FEE_RATIO;
	public static int CH_CURTAIN1_FEE;
	public static int CH_CURTAIN2_FEE;
	public static long CH_FRONT_FEE_RATIO;
	public static int CH_FRONT1_FEE;
	public static int CH_FRONT2_FEE;
	public static int GM_ACCESSLEVEL;
	public static int GM_MIN;
	public static int GM_ALTG_MIN_LEVEL;
	public static int GM_ANNOUNCE;
	public static int GM_BAN;
	public static int GM_BAN_CHAT;
	public static int GM_CREATE_ITEM;
	public static int GM_DELETE;
	public static int GM_KICK;
	public static int GM_MENU;
	public static int GM_GODMODE;
	public static int GM_CHAR_EDIT;
	public static int GM_CHAR_EDIT_OTHER;
	public static int GM_CHAR_VIEW;
	public static int GM_NPC_EDIT;
	public static int GM_NPC_VIEW;
	public static int GM_PRIV_EDIT;
	public static int GM_PRIV_VIEW;
	public static int GM_TELEPORT;
	public static int GM_TELEPORT_OTHER;
	public static int GM_RESTART;
	public static int GM_MONSTERRACE;
	public static int GM_RIDER;
	public static int GM_ESCAPE;
	public static int GM_FIXED;
	public static int GM_CREATE_NODES;
	public static int GM_ENCHANT;
	public static int GM_DOOR;
	public static int GM_RES;
	public static int GM_PEACEATTACK;
	public static int GM_HEAL;
	public static int GM_UNBLOCK;
	public static int GM_CACHE;
	public static int GM_TALK_BLOCK;
	public static int GM_TEST;
	public static int GM_FORTSIEGE;
	public static int GM_CLAN_PANEL;
	public static int GM_REPAIR = 75;
	public static boolean GM_DISABLE_TRANSACTION;
	public static int GM_TRANSACTION_MIN;
	public static int GM_TRANSACTION_MAX;
	public static int GM_CAN_GIVE_DAMAGE;
	public static int GM_DONT_TAKE_EXPSP;
	public static int GM_DONT_TAKE_AGGRO;
	public static int MAX_ITEM_ENCHANT_KICK;

	public static enum ObjectMapType 
	{
		L2ObjectHashMap, WorldObjectMap
	}

	public static enum ObjectSetType 
	{
		L2ObjectHashSet, WorldObjectSet
	}

	public static enum IdFactoryType 
	{
		Compaction, BitSet, Stack
	}

	public static IdFactoryType IDFACTORY_TYPE;
	public static boolean BAD_ID_CHECKING;
	public static ObjectMapType MAP_TYPE;
	public static ObjectSetType SET_TYPE;
	public static boolean DEBUG;
	public static boolean ASSERT;
	public static boolean DEVELOPER;
	public static boolean SERVER_LIST_BRACKET;
	public static boolean SERVER_LIST_CLOCK;
	public static boolean SERVER_LIST_TESTSERVER;
	public static boolean SERVER_GMONLY;
	public static boolean TEST_SERVER;
	public static boolean EVERYBODY_HAS_ADMIN_RIGHTS;
	public static String DEFAULT_GLOBAL_CHAT;
	public static String DEFAULT_TRADE_CHAT;
	public static int DEFAULT_PUNISH;
	public static int DEFAULT_PUNISH_PARAM;
	public static int COORD_SYNCHRONIZE;
	public static int ZONE_TOWN;
	public static boolean BYPASS_VALIDATION;
	public static boolean GAMEGUARD_ENFORCE;
	public static boolean GAMEGUARD_PROHIBITACTION;
	public static int DELETE_DAYS;
	public static int FLOODPROTECTOR_INITIALSIZE;
	public static boolean AUTODELETE_INVALID_QUEST_DATA;
	public static boolean ALLOW_DISCARDITEM;
	public static boolean FORCE_INVENTORY_UPDATE;
	public static boolean MULTIPLE_ITEM_DROP;
	public static boolean PRECISE_DROP_CALCULATION;
	public static boolean LAZY_CACHE;
	public static int MAX_DRIFT_RANGE;
	public static int PACKET_LIFETIME;
	public static String PROTECTED_ITEMS;
	public static List<Integer> LIST_PROTECTED_ITEMS = new FastList<Integer>();
	public static int AUTODESTROY_ITEM_AFTER;
	public static int HERB_AUTO_DESTROY_TIME;
	public static boolean DESTROY_DROPPED_PLAYER_ITEM;
	public static boolean DESTROY_EQUIPABLE_PLAYER_ITEM;
	public static boolean SAVE_DROPPED_ITEM;
	public static boolean EMPTY_DROPPED_ITEM_TABLE_AFTER_LOAD;
	public static int SAVE_DROPPED_ITEM_INTERVAL;
	public static boolean CLEAR_DROPPED_ITEM_TABLE;
	public static int MIN_NPC_ANIMATION;
	public static int MAX_NPC_ANIMATION;
	public static boolean SHOW_NPC_LVL;
	public static boolean ALLOW_WAREHOUSE;
	public static boolean WAREHOUSE_CACHE;
	public static int WAREHOUSE_CACHE_TIME;
	public static boolean ALLOW_WEAR;
	public static int WEAR_DELAY;
	public static int WEAR_PRICE;
	public static boolean ALLOW_LOTTERY;
	public static boolean ALLOW_RACE;
	public static boolean ALLOW_WATER;
	public static boolean ALLOW_FISHING;
	public static boolean ALLOWFISHING;
	public static boolean ALLOW_RENTPET;
	public static boolean ALLOW_BOAT;
	public static boolean ALLOW_CURSED_WEAPONS;
	public static boolean ALLOW_FREIGHT;
	public static boolean LOG_CHAT;
	public static boolean LOG_ITEMS;
	public static boolean LOG_TRADES;
	public static boolean LOG_PDAM;
	public static boolean LOG_MDAM;
	public static String COMMUNITY_TYPE;
	public static String BBS_DEFAULT;
	public static boolean SHOW_LEVEL_COMMUNITYBOARD;
	public static boolean SHOW_STATUS_COMMUNITYBOARD;
	public static int NAME_PAGE_SIZE_COMMUNITYBOARD;
	public static int NAME_PER_ROW_COMMUNITYBOARD;
	public static int THREAD_P_EFFECTS;
	public static int THREAD_P_GENERAL;
	public static int GENERAL_PACKET_THREAD_CORE_SIZE;
	public static int IO_PACKET_THREAD_CORE_SIZE;
	public static int GENERAL_THREAD_CORE_SIZE;
	public static int AI_MAX_THREAD;
	public static boolean GRIDS_ALWAYS_ON;
	public static int GRID_NEIGHBOR_TURNON_TIME;
	public static int GRID_NEIGHBOR_TURNOFF_TIME;
	public static int GEODATA;
	public static boolean FORCE_GEODATA;
	public static boolean MOVE_BASED_KNOWNLIST;
	public static long KNOWNLIST_UPDATE_INTERVAL;
	public static boolean ACCEPT_GEOEDITOR_CONN;
	public static int STARTING_ADENA;
	public static int STARTING_AA;
	public static byte STARTING_LEVEL;
	public static int WYVERN_SPEED;
	public static int STRIDER_SPEED;
	public static boolean ALLOW_WYVERN_UPGRADER;
	public static boolean EFFECT_CANCELING;
	public static boolean ALLOW_GUARDS;
	public static boolean DEEPBLUE_DROP_RULES;
	public static int INVENTORY_MAXIMUM_NO_DWARF;
	public static int INVENTORY_MAXIMUM_DWARF;
	public static int INVENTORY_MAXIMUM_GM;
	public static int WAREHOUSE_SLOTS_NO_DWARF;
	public static int WAREHOUSE_SLOTS_DWARF;
	public static int WAREHOUSE_SLOTS_CLAN;
	public static int FREIGHT_SLOTS;
	public static int ENCHANT_CHANCE_WEAPON;
	public static int ENCHANT_CHANCE_ARMOR;
	public static int ENCHANT_CHANCE_JEWELRY;
	public static int ENCHANT_MAX_WEAPON;
	public static int ENCHANT_MAX_ARMOR;
	public static int ENCHANT_MAX_JEWELRY;
	public static int ENCHANT_SAFE_MAX;
	public static int ENCHANT_SAFE_MAX_FULL;
	public static boolean ENCHANT_STACKABLE;
	public static double HP_REGEN_MULTIPLIER;
	public static double MP_REGEN_MULTIPLIER;
	public static double CP_REGEN_MULTIPLIER;
	public static double RAID_HP_REGEN_MULTIPLIER;
	public static double RAID_MP_REGEN_MULTIPLIER;
	public static double RAID_DEFENCE_MULTIPLIER;
	public static double RAID_MINION_RESPAWN_TIMER;
	public static float RAID_MIN_RESPAWN_MULTIPLIER;
	public static float RAID_MAX_RESPAWN_MULTIPLIER;
	public static int UNSTUCK_INTERVAL;
	public static int PLAYER_SPAWN_PROTECTION;
	public static int PLAYER_FAKEDEATH_UP_PROTECTION;
	public static String PARTY_XP_CUTOFF_METHOD;
	public static int PARTY_XP_CUTOFF_LEVEL;
	public static double PARTY_XP_CUTOFF_PERCENT;
	public static double RESPAWN_RESTORE_CP;
	public static double RESPAWN_RESTORE_HP;
	public static double RESPAWN_RESTORE_MP;
	public static boolean RESPAWN_RANDOM_ENABLED;
	public static int RESPAWN_RANDOM_MAX_OFFSET;
	public static int MAX_PVTSTORE_SLOTS_DWARF;
	public static int MAX_PVTSTORE_SLOTS_OTHER;
	public static boolean STORE_SKILL_COOLTIME;
	public static String PET_RENT_NPC;
	public static List<Integer> LIST_PET_RENT_NPC = new FastList<Integer>();
	public static boolean ANNOUNCE_MAMMON_SPAWN;
	public static boolean ALT_PRIVILEGES_ADMIN;
	public static boolean ALT_PRIVILEGES_SECURE_CHECK;
	public static int ALT_PRIVILEGES_DEFAULT_LEVEL;
	public static boolean GM_NAME_COLOR_ENABLED;
	public static int GM_NAME_COLOR;
	public static int ADMIN_NAME_COLOR;
	public static int MASTERACCESS_LEVEL;
	public static int MASTERACCESS_NAME_COLOR;
	public static int MASTERACCESS_TITLE_COLOR;
	public static boolean GM_HERO_AURA;
	public static boolean GM_STARTUP_INVULNERABLE;
	public static boolean GM_STARTUP_INVISIBLE;
	public static boolean GM_STARTUP_SILENCE;
	public static boolean GM_STARTUP_AUTO_LIST;
	public static boolean PETITIONING_ALLOWED;
	public static int MAX_PETITIONS_PER_PLAYER;
	public static int MAX_PETITIONS_PENDING;
	public static boolean JAIL_IS_PVP;
	public static boolean JAIL_DISABLE_CHAT;
	public static int KARMA_MIN_KARMA;
	public static int KARMA_MAX_KARMA;
	public static int KARMA_XP_DIVIDER;
	public static int KARMA_LOST_BASE;
	public static boolean KARMA_DROP_GM;
	public static boolean KARMA_AWARD_PK_KILL;
	public static int KARMA_PK_LIMIT;
	public static String KARMA_NONDROPPABLE_PET_ITEMS;
	public static String KARMA_NONDROPPABLE_ITEMS;
	public static List<Integer> KARMA_LIST_NONDROPPABLE_PET_ITEMS = new FastList<Integer>();
	public static List<Integer> KARMA_LIST_NONDROPPABLE_ITEMS = new FastList<Integer>();
	public static String NONDROPPABLE_ITEMS;
	public static List<Integer> LIST_NONDROPPABLE_ITEMS = new FastList<Integer>();
	public static int PVP_NORMAL_TIME;
	public static int PVP_PVP_TIME;
	public static float RATE_XP;
	public static float RATE_SP;
	public static float RATE_PARTY_XP;
	public static float RATE_PARTY_SP;
	public static float RATE_QUESTS_REWARD;
	public static float RATE_DROP_ADENA;
	public static float RATE_CONSUMABLE_COST;
	public static float RATE_DROP_ITEMS;
	public static float RATE_DROP_SPOIL;
	public static int RATE_DROP_MANOR;
	public static float ITEMS_RAID;
	public static float RATE_DROP_QUEST;
	public static float RATE_KARMA_EXP_LOST;
	public static float RATE_SIEGE_GUARDS_PRICE;
	public static float RATE_DROP_COMMON_HERBS;
	public static float RATE_DROP_MP_HP_HERBS;
	public static float RATE_DROP_GREATER_HERBS;
	public static float RATE_DROP_SUPERIOR_HERBS;
	public static float RATE_DROP_SPECIAL_HERBS;
	public static int PLAYER_DROP_LIMIT;
	public static int PLAYER_RATE_DROP;
	public static int PLAYER_RATE_DROP_ITEM;
	public static int PLAYER_RATE_DROP_EQUIP;
	public static int PLAYER_RATE_DROP_EQUIP_WEAPON;
	public static float PET_XP_RATE;
	public static int PET_FOOD_RATE;
	public static float SINEATER_XP_RATE;
	public static int KARMA_DROP_LIMIT;
	public static int KARMA_RATE_DROP;
	public static int KARMA_RATE_DROP_ITEM;
	public static int KARMA_RATE_DROP_EQUIP;
	public static int KARMA_RATE_DROP_EQUIP_WEAPON;
	public static boolean ALT_GAME_REQUIRE_CASTLE_DAWN;
	public static boolean ALT_GAME_REQUIRE_CLAN_CASTLE;
	public static boolean ALT_GAME_FREE_TELEPORT;
	public static int ALT_FESTIVAL_MIN_PLAYER;
	public static int ALT_MAXIMUM_PLAYER_CONTRIB;
	public static long ALT_FESTIVAL_MANAGER_START;
	public static long ALT_FESTIVAL_LENGTH;
	public static long ALT_FESTIVAL_CYCLE_LENGTH;
	public static long ALT_FESTIVAL_FIRST_SPAWN;
	public static long ALT_FESTIVAL_FIRST_SWARM;
	public static long ALT_FESTIVAL_SECOND_SPAWN;
	public static long ALT_FESTIVAL_SECOND_SWARM;
	public static long ALT_FESTIVAL_CHEST_SPAWN;
	public static boolean IS_TELNET_ENABLED;
	public static int PORT_GAME;
	public static int PORT_LOGIN;
	public static String LOGIN_BIND_ADDRESS;
	public static int LOGIN_TRY_BEFORE_BAN;
	public static int LOGIN_BLOCK_AFTER_BAN;
	public static String GAMESERVER_HOSTNAME;
	public static String DATABASE_DRIVER;
	public static String DATABASE_URL;
	public static String DATABASE_LOGIN;
	public static String DATABASE_PASSWORD;
	public static int DATABASE_MAXSTATEMENTS;
	public static int DATABASE_MAX_CONNECTIONS;
	public static int DATABASE_MIN_POOLSIZE;
	public static int DATABASE_MAX_POOLSIZE;
	public static int DATABASE_ACQUIREINCREMENT;
	public static int DATABASE_IDLECONNECTIONTEST;
	public static int DATABASE_MAXIDLETIME;
	public static int MAXIMUM_ONLINE_USERS;
	public static String CNAME_TEMPLATE;
	public static String PET_NAME_TEMPLATE;
	public static int MAX_CHARACTERS_NUMBER_PER_ACCOUNT;

	public static String FortressSiege_EVEN_TEAMS;
	public static boolean FortressSiege_SAME_IP_PLAYERS_ALLOWED;
	public static boolean FortressSiege_ALLOW_INTERFERENCE;
	public static boolean FortressSiege_ALLOW_POTIONS;
	public static boolean FortressSiege_ALLOW_SUMMON;
	public static boolean FortressSiege_ON_START_REMOVE_ALL_EFFECTS;
	public static boolean FortressSiege_ON_START_UNSUMMON_PET;
	public static boolean FortressSiege_ANNOUNCE_TEAM_STATS;
	public static boolean FortressSiege_JOIN_CURSED;
	public static boolean FortressSiege_REVIVE_RECOVERY;
	public static boolean FortressSiege_PRICE_NO_KILLS;

	public static boolean ALLOW_WEDDING;
	public static int CUSTOM_SUBCLASS_LVL;
	public static boolean ALLOW_HERO_COMMAND;
	public static int HERO_ITEM_ID;
	public static int HERO_ITEM_COUNT;
	public static int WEDDING_PRICE;
	public static boolean WEDDING_PUNISH_INFIDELITY;
	public static boolean WEDDING_TELEPORT;
	public static int WEDDING_TELEPORT_PRICE;
	public static int WEDDING_TELEPORT_INTERVAL;
	public static boolean WEDDING_SAMESEX;
	public static boolean WEDDING_FORMALWEAR;
	public static int WEDDING_DIVORCE_COSTS;

	public static boolean ALLOW_PVP_REWARD;
	public static int PVP_REWARD_ITEM;
	public static int PVP_REWARD_COUNT;
	public static boolean PVP_NO_ESCAPE;
	public static int MAX_RCRIT;
	public static int MAX_PATK_SPEED;
	public static int MAX_MATK_SPEED;
	public static boolean KEEP_SUBCLASS_SKILLS;
	public static int MAX_SUBCLASSES;
	public static boolean NPC_ATTACKABLE;
	public static List<Integer> INVUL_NPC_LIST;
	public static float DAGGER_RECUDE_DMG_VS_ROBE;
	public static float DAGGER_RECUDE_DMG_VS_LIGHT;
	public static float DAGGER_RECUDE_DMG_VS_HEAVY;
	public static int FRONT_BLOW_SUCCESS;
	public static int BACK_BLOW_SUCCESS;
	public static int SIDE_BLOW_SUCCESS;
	public static boolean DISABLE_GRADE_PENALTIES;
	public static boolean DISABLE_WEIGHT_PENALTIES;
	public static boolean ALLOW_REMOTE_CLASS_MASTERS;
	public static boolean ALLOW_L2WALKER_PROTECTION;
	public static boolean PVP_SAME_IP;
	public static int CUSTOM_RUN_SPEED;
	public static double MULTIPLE_MCRIT;
	public static int DEATH_PENALTY_CHANCE;
	public static boolean CUSTOM_STARTER_ITEMS_ENABLED;
	public static boolean DISABLE_OFFICIAL_STARTER_ITEMS;
	public static List<int[]> CUSTOM_STARTER_ITEMS = new FastList<int[]>();
	public static int MIN_MONSTER_ANIMATION;
	public static int MAX_MONSTER_ANIMATION;
	public static int MAX_RUN_SPEED;
	public static int MAX_EVASION;
	public static int MAX_MCRIT_RATE;
	public static boolean ALLOW_MANOR;
	public static int ALT_MANOR_REFRESH_TIME;
	public static int ALT_MANOR_REFRESH_MIN;
	public static int ALT_MANOR_APPROVE_TIME;
	public static int ALT_MANOR_APPROVE_MIN;
	public static int ALT_MANOR_MAINTENANCE_PERIOD;
	public static boolean ALT_MANOR_SAVE_ALL_ACTIONS;
	public static int ALT_MANOR_SAVE_PERIOD_RATE;
	public static boolean ALLOW_NPC_WALKERS;
	public static boolean SHOW_HTML_WELCOME;
	public static boolean ONLINE_PLAYERS_AT_STARTUP;
	public static int PLAYERS_ONLINE_TRICK;
	public static int ONLINE_PLAYERS_ANNOUNCE_INTERVAL;
	public static boolean ANNOUNCE_CASTLE_LORDS;
	public static int RIFT_MIN_PARTY_SIZE;
	public static int RIFT_MAX_JUMPS;
	public static int RIFT_SPAWN_DELAY;
	public static int RIFT_AUTO_JUMPS_TIME_MIN;
	public static int RIFT_AUTO_JUMPS_TIME_MAX;
	public static int RIFT_ENTER_COST_RECRUIT;
	public static int RIFT_ENTER_COST_SOLDIER;
	public static int RIFT_ENTER_COST_OFFICER;
	public static int RIFT_ENTER_COST_CAPTAIN;
	public static int RIFT_ENTER_COST_COMMANDER;
	public static int RIFT_ENTER_COST_HERO;
	public static int CLAN_RAISE_FIRST_COST;
	public static int CLAN_RAISE_SEC_COST;
	public static int CLAN_MEMBERS_FIRST;
	public static int CLAN_MEMBERS_SEC;
	public static int CLAN_MEMBERS_THIRD;
	public static int CLAN_REPUTATION_FIRST;
	public static int CLAN_REPUTATION_SEC;
	public static int CLAN_REPUTATION_THIRD;
	public static int CLAN_SP_FIRST;
	public static int CLAN_SP_SEC;
	public static int CLAN_SP_THIRD;
	public static int CLAN_SP_FORTH;
	public static int CLAN_SP_FIFTH;
	public static boolean CLAN_LEADER_COLOR_ENABLED;
	public static int CLAN_LEADER_COLOR;
	public static int CLAN_LEADER_COLOR_CLAN_LEVEL;
	public static boolean CLAN_LEADER_TITLE_ENABLED;
	public static int CLAN_LEADER_TITLE;
	public static int CLAN_LEADER_TITLE_CLAN_LEVEL;
	public static int GM_OVER_ENCHANT;
	public static int ENCHANT_MAX_ALLOWED_WEAPON;
	public static int ENCHANT_MAX_ALLOWED_ARMOR;
	public static int ENCHANT_MAX_ALLOWED_JEWELRY;
	public static boolean CHECK_SKILLS_ON_ENTER;
	public static String ALLOWED_SKILLS;
	public static FastList<Integer> ALLOWED_SKILLS_LIST = new FastList<Integer>();
	public static int ENCHANT_CHANCE_WEAPON_CRYSTAL;
	public static int ENCHANT_CHANCE_ARMOR_CRYSTAL;
	public static int ENCHANT_CHANCE_JEWELRY_CRYSTAL;
	public static int ENCHANT_CHANCE_WEAPON_BLESSED;
	public static int ENCHANT_CHANCE_ARMOR_BLESSED;
	public static int ENCHANT_CHANCE_JEWELRY_BLESSED;
	public static int ENCHANT_FAILED_LVL;
	public static String GM_ADMIN_MENU_STYLE;
	public static boolean ENABLE_PACKET_PROTECTION;
	public static int MAX_UNKNOWN_PACKETS;
	public static int UNKNOWN_PACKETS_PUNISHMENT;
	public static boolean GMAUDIT;
	public static boolean SUBCLASS_WITH_ITEM_AND_NO_QUEST;
	public static boolean FLYING_WYVERN_DURING_SIEGE;
	public static boolean LIFE_CRYSTAL_NEEDED;
	public static boolean REMOVE_CASTLE_CIRCLETS;
	public static boolean ENABLE_WAREHOUSESORTING_CLAN;
	public static boolean ENABLE_WAREHOUSESORTING_PRIVATE;
	public static boolean ENABLE_WAREHOUSESORTING_FREIGHT;
	public static boolean DISABLE_SUMMON_IN_COMBAT;
	public static boolean DISABLE_ATTACK_NPC_TYPE;
	public static int ALT_PERFECT_SHLD_BLOCK;
	public static String ALLOWED_NPC_TYPES;
	public static FastList<String> LIST_ALLOWED_NPC_TYPES = new FastList<String>();
	public static boolean CUSTOM_SPAWNLIST_TABLE;
	public static boolean SAVE_GMSPAWN_ON_CUSTOM;
	public static boolean DELETE_GMSPAWN_ON_CUSTOM;
	public static boolean CUSTOM_NPC_TABLE;
	public static boolean CUSTOM_ETCITEM_TABLE;
	public static boolean CUSTOM_ARMOR_TABLE;
	public static boolean CUSTOM_ARMORSETS_TABLE;
	public static boolean CUSTOM_WEAPON_TABLE;
	public static boolean CUSTOM_TELEPORT_TABLE;
	public static boolean CUSTOM_DROPLIST_TABLE;
	public static boolean CUSTOM_MERCHANT_TABLES;

	public static boolean ENABLE_MODIFY_SKILL_DURATION;
	public static Map<Integer, Integer> SKILL_DURATION_LIST;
	
	public static boolean CASTLE_SHIELD;
	public static boolean CLANHALL_SHIELD;
	public static boolean APELLA_ARMORS;
	public static boolean OATH_ARMORS;
	public static boolean CASTLE_CROWN;
	public static boolean CASTLE_CIRCLETS;
	public static long FS_TELE_FEE_RATIO;
	public static int FS_TELE1_FEE;
	public static int FS_TELE2_FEE;
	public static long FS_MPREG_FEE_RATIO;
	public static int FS_MPREG1_FEE;
	public static int FS_MPREG2_FEE;
	public static long FS_HPREG_FEE_RATIO;
	public static int FS_HPREG1_FEE;
	public static int FS_HPREG2_FEE;
	public static long FS_EXPREG_FEE_RATIO;
	public static int FS_EXPREG1_FEE;
	public static int FS_EXPREG2_FEE;
	public static long FS_SUPPORT_FEE_RATIO;
	public static int FS_SUPPORT1_FEE;
	public static int FS_SUPPORT2_FEE;
	public static int AUGMENTATION_BASESTAT_CHANCE;
	public static int AUGMENTATION_NG_SKILL_CHANCE;
	public static int AUGMENTATION_NG_GLOW_CHANCE;
	public static int AUGMENTATION_MID_SKILL_CHANCE;
	public static int AUGMENTATION_MID_GLOW_CHANCE;
	public static int AUGMENTATION_HIGH_SKILL_CHANCE;
	public static int AUGMENTATION_HIGH_GLOW_CHANCE;
	public static int AUGMENTATION_TOP_SKILL_CHANCE;
	public static int AUGMENTATION_TOP_GLOW_CHANCE;
	public static float SK_FIG;
	public static float SK_MAG;
	public static float AP_FIG;
	public static float CP_MAG;
	public static float M_TK;
	public static float RIFT_BOSS_ROOM_TIME_MUTIPLY;
	public static int FS_TIME_ATTACK;
	public static int FS_TIME_COOLDOWN;
	public static int FS_TIME_ENTRY;
	public static int FS_TIME_WARMUP;
	public static int FS_PARTY_MEMBER_COUNT;
	public static boolean DEVASTATED_CASTLE_ENABLED;
	public static boolean FORTRESS_OF_THE_DEAD_ENABLED;
	public static boolean FAILD_FAKEDEATH;
	public static File DATAPACK_ROOT;
	public static int MIN_PROTOCOL_REVISION;
	public static int MAX_PROTOCOL_REVISION;
	public static int MMO_SELECTOR_SLEEP_TIME;
	public static int MMO_MAX_SEND_PER_PASS;
	public static int MMO_MAX_READ_PER_PASS;
	public static int MMO_HELPER_BUFFER_COUNT;
	public static int MMO_IO_SELECTOR_THREAD_COUNT;
	public static boolean USE_3D_MAP;
	public static boolean CHECK_KNOWN;
	public static int GAME_SERVER_LOGIN_PORT;
	public static String GAME_SERVER_LOGIN_HOST;
	public static String INTERNAL_HOSTNAME;
	public static String EXTERNAL_HOSTNAME;
	public static int PATH_NODE_RADIUS;
	public static int NEW_NODE_ID;
	public static int SELECTED_NODE_ID;
	public static boolean TOGGLE_WEAPON_ALLOWED;
	public static int LINKED_NODE_ID;
	public static String NEW_NODE_TYPE;
	public static int IP_UPDATE_TIME;
	public static boolean COUNT_PACKETS = false;
	public static boolean DUMP_PACKET_COUNTS = false;
	public static int DUMP_INTERVAL_SECONDS = 60;
	public static boolean SHOW_LICENCE;
	public static boolean FORCE_GGAUTH;
	public static boolean ACCEPT_NEW_GAMESERVER;
	public static int SERVER_ID;
	public static byte[] HEX_ID;
	public static boolean ACCEPT_ALTERNATE_ID;
	public static int REQUEST_ID;
	public static boolean RESERVE_HOST_ON_LOGIN = false;
	public static int MINIMUM_UPDATE_DISTANCE;
	public static int KNOWNLIST_FORGET_DELAY;
	public static int MINIMUN_UPDATE_TIME;
	public static boolean ONLY_GM_ITEMS_FREE;
	public static boolean AUTO_CREATE_ACCOUNTS;
	public static boolean FLOOD_PROTECTION;
	public static int FAST_CONNECTION_LIMIT;
	public static int NORMAL_CONNECTION_TIME;
	public static int FAST_CONNECTION_TIME;
	public static int MAX_CONNECTION_PER_IP;
	public static boolean DATABASE_AUTO_ANALYZE;
	public static boolean DATABASE_AUTO_CHECK;
	public static boolean DATABASE_AUTO_OPTIMIZE;
	public static boolean DATABASE_AUTO_REPAIR;

	@SuppressWarnings("resource")
	public static void load() 
	{
		if (Server.serverMode == Server.MODE_GAMESERVER) 
		{
			_log.info("GameServer: Configs Loaded");
			InputStream is = null;
			try 
			{
				try 
				{
					Properties serverSettings = new Properties();
					is = new FileInputStream(new File(CONFIGURATION_FILE));
					serverSettings.load(is);

					GAMESERVER_HOSTNAME = serverSettings.getProperty("GameserverHostname");
					PORT_GAME = Integer.parseInt(serverSettings.getProperty("GameserverPort", "7777"));
					EXTERNAL_HOSTNAME = serverSettings.getProperty("ExternalHostname", "*");
					INTERNAL_HOSTNAME = serverSettings.getProperty("InternalHostname", "*");
					GAME_SERVER_LOGIN_PORT = Integer.parseInt(serverSettings.getProperty("LoginPort", "9014"));
					GAME_SERVER_LOGIN_HOST = serverSettings.getProperty("LoginHost", "127.0.0.1");
					REQUEST_ID = Integer.parseInt(serverSettings.getProperty("RequestServerID", "0"));
					ACCEPT_ALTERNATE_ID = Boolean.parseBoolean(serverSettings.getProperty("AcceptAlternateID", "True"));
					
					DATABASE_DRIVER = serverSettings.getProperty("Driver","com.mysql.jdbc.Driver");
					DATABASE_URL = serverSettings.getProperty("URL","jdbc:mysql://localhost/l2jdb");
					DATABASE_LOGIN = serverSettings.getProperty("Login", "root");
					DATABASE_PASSWORD = serverSettings.getProperty("Password","");
					DATABASE_MAX_CONNECTIONS = Integer.parseInt(serverSettings.getProperty("MaximumDbConnections", "50"));
					DATABASE_MAXSTATEMENTS = Integer.parseInt(serverSettings.getProperty("MaximumStateMents", "100"));
					DATABASE_MIN_POOLSIZE = Integer.parseInt(serverSettings.getProperty("MinPoolSize", "50"));
					DATABASE_MAX_POOLSIZE = Integer.parseInt(serverSettings.getProperty("MaxPoolSize", "10"));
					DATABASE_ACQUIREINCREMENT = Integer.parseInt(serverSettings.getProperty("AquireIncrement", "1"));
					DATABASE_IDLECONNECTIONTEST = Integer.parseInt(serverSettings.getProperty("IdleConnectionTest", "10800"));
					DATABASE_MAXIDLETIME = Integer.parseInt(serverSettings.getProperty("MaxIdleTime", "0"));
					DATAPACK_ROOT = new File(serverSettings.getProperty("DatapackRoot", ".")).getCanonicalFile();
					
					CNAME_TEMPLATE = serverSettings.getProperty("CnameTemplate", ".*");
					PET_NAME_TEMPLATE = serverSettings.getProperty("PetNameTemplate", ".*");
					MAX_CHARACTERS_NUMBER_PER_ACCOUNT = Integer.parseInt(serverSettings.getProperty("CharMaxNumber", "0"));
					MAXIMUM_ONLINE_USERS = Integer.parseInt(serverSettings.getProperty("MaximumOnlineUsers", "100"));
					MIN_PROTOCOL_REVISION = Integer.parseInt(serverSettings.getProperty("MinProtocolRevision", "660"));
					MAX_PROTOCOL_REVISION = Integer.parseInt(serverSettings.getProperty("MaxProtocolRevision", "665"));
					
					ENABLE_PACKET_PROTECTION = Boolean.parseBoolean(serverSettings.getProperty("PacketProtection", "True"));
					MAX_UNKNOWN_PACKETS = Integer.parseInt(serverSettings.getProperty("UnknownPacketsBeforeBan", "5"));
					UNKNOWN_PACKETS_PUNISHMENT = Integer.parseInt(serverSettings.getProperty("UnknownPacketsPunishment", "2"));
					if (MIN_PROTOCOL_REVISION > MAX_PROTOCOL_REVISION)
						throw new Error("MinProtocolRevision is bigger than MaxProtocolRevision in server configuration file.");
					
					DATABASE_AUTO_ANALYZE = Boolean.parseBoolean(serverSettings.getProperty("DatabaseAutoAnalyze", "False"));
					DATABASE_AUTO_CHECK = Boolean.parseBoolean(serverSettings.getProperty("DatabaseAutoCheck", "False"));
					DATABASE_AUTO_OPTIMIZE = Boolean.parseBoolean(serverSettings.getProperty("DatabaseAutoOptimize", "False"));
					DATABASE_AUTO_REPAIR = Boolean.parseBoolean(serverSettings.getProperty("DatabaseAutoRepair", "False"));
					MMO_SELECTOR_SLEEP_TIME = Integer.parseInt(serverSettings.getProperty("SleepTime", "20"));
					
					MMO_IO_SELECTOR_THREAD_COUNT = Integer.parseInt(serverSettings.getProperty("IOSelectorThreadCount", "2"));
					MMO_MAX_SEND_PER_PASS = Integer.parseInt(serverSettings.getProperty("MaxSendPerPass", "12"));
					MMO_MAX_READ_PER_PASS = Integer.parseInt(serverSettings.getProperty("MaxReadPerPass", "12"));
					MMO_HELPER_BUFFER_COUNT = Integer.parseInt(serverSettings.getProperty("HelperBufferCount", "20"));
					
					DEADLOCK_DETECTOR = Boolean.parseBoolean(serverSettings.getProperty("DeadLockDetector", "False"));
					DEADLOCK_CHECK_INTERVAL = Integer.parseInt(serverSettings.getProperty("DeadLockCheckInterval", "20"));
					RESTART_ON_DEADLOCK = Boolean.parseBoolean(serverSettings.getProperty("RestartOnDeadlock", "False"));
				}
				catch 
				(Exception e) 
				{
					e.printStackTrace();
					throw new Error("Failed to Load " + CONFIGURATION_FILE + " File.");
				}
				try 
				{
					Properties altSettings = new Properties();
					is = new FileInputStream(new File(ALT_SETTINGS_FILE));
					altSettings.load(is);

					SOUL_CRYSTAL_LEVEL_CHANCE = Integer.parseInt(altSettings.getProperty("SoulCrystalLevelChance", "32"));

					IS_CRAFTING_ENABLED = Boolean.parseBoolean(altSettings.getProperty("CraftingEnabled", "True"));
					DWARF_RECIPE_LIMIT = Integer.parseInt(altSettings.getProperty("DwarfRecipeLimit", "50"));
					COMMON_RECIPE_LIMIT = Integer.parseInt(altSettings.getProperty("CommonRecipeLimit", "50"));
					ALT_GAME_CREATION = Boolean.parseBoolean(altSettings.getProperty("AltGameCreation", "False"));
					ALT_GAME_CREATION_SPEED = Double.parseDouble(altSettings.getProperty("AltGameCreationSpeed", "1"));
					ALT_GAME_CREATION_XP_RATE = Double.parseDouble(altSettings.getProperty("AltGameCreationRateXp", "1"));
					ALT_GAME_CREATION_SP_RATE = Double.parseDouble(altSettings.getProperty("AltGameCreationRateSp", "1"));
					ALT_BLACKSMITH_USE_RECIPES = Boolean.parseBoolean(altSettings.getProperty("AltBlacksmithUseRecipes", "True"));

					ALLOW_MANOR = Boolean.parseBoolean(altSettings.getProperty("AllowManor", "False"));
					ALT_MANOR_REFRESH_TIME = Integer.parseInt(altSettings.getProperty("AltManorRefreshTime", "20"));
					ALT_MANOR_REFRESH_MIN = Integer.parseInt(altSettings.getProperty("AltManorRefreshMin", "00"));
					ALT_MANOR_APPROVE_TIME = Integer.parseInt(altSettings.getProperty("AltManorApproveTime", "6"));
					ALT_MANOR_APPROVE_MIN = Integer.parseInt(altSettings.getProperty("AltManorApproveMin", "00"));
					ALT_MANOR_MAINTENANCE_PERIOD = Integer.parseInt(altSettings.getProperty("AltManorMaintenancePreiod", "360000"));
					ALT_MANOR_SAVE_ALL_ACTIONS = Boolean.parseBoolean(altSettings.getProperty("AltManorSaveAllActions", "False"));
					ALT_MANOR_SAVE_PERIOD_RATE = Integer.parseInt(altSettings.getProperty("AltManorSavePeriodRate", "2"));

					RIFT_MIN_PARTY_SIZE = Integer.parseInt(altSettings.getProperty("RiftMinPartySize", "5"));
					RIFT_MAX_JUMPS = Integer.parseInt(altSettings.getProperty("MaxRiftJumps", "4"));
					RIFT_SPAWN_DELAY = Integer.parseInt(altSettings.getProperty("RiftSpawnDelay", "10000"));
					RIFT_AUTO_JUMPS_TIME_MIN = Integer.parseInt(altSettings.getProperty("AutoJumpsDelayMin", "480"));
					RIFT_AUTO_JUMPS_TIME_MAX = Integer.parseInt(altSettings.getProperty("AutoJumpsDelayMax", "600"));
					RIFT_BOSS_ROOM_TIME_MUTIPLY = Float.parseFloat(altSettings.getProperty("BossRoomTimeMultiply", "1.5"));
					RIFT_ENTER_COST_RECRUIT = Integer.parseInt(altSettings.getProperty("RecruitCost", "18"));
					RIFT_ENTER_COST_SOLDIER = Integer.parseInt(altSettings.getProperty("SoldierCost", "21"));
					RIFT_ENTER_COST_OFFICER = Integer.parseInt(altSettings.getProperty("OfficerCost", "24"));
					RIFT_ENTER_COST_CAPTAIN = Integer.parseInt(altSettings.getProperty("CaptainCost", "27"));
					RIFT_ENTER_COST_COMMANDER = Integer.parseInt(altSettings.getProperty("CommanderCost", "30"));
					RIFT_ENTER_COST_HERO = Integer.parseInt(altSettings.getProperty("HeroCost", "33"));

					CASTLE_SHIELD = Boolean.parseBoolean(altSettings.getProperty("CastleShieldRestriction", "True"));
					CLANHALL_SHIELD = Boolean.parseBoolean(altSettings.getProperty("ClanHallShieldRestriction", "True"));
					APELLA_ARMORS = Boolean.parseBoolean(altSettings.getProperty("ApellaArmorsRestriction", "True"));
					OATH_ARMORS = Boolean.parseBoolean(altSettings.getProperty("OathArmorsRestriction", "True"));
					CASTLE_CROWN = Boolean.parseBoolean(altSettings.getProperty("CastleLordsCrownRestriction", "True"));
					CASTLE_CIRCLETS = Boolean.parseBoolean(altSettings.getProperty("CastleCircletsRestriction", "True"));

					ALT_OLY_START_TIME = Integer.parseInt(altSettings.getProperty("AltOlyStartTime", "18"));
					ALT_OLY_MIN = Integer.parseInt(altSettings.getProperty("AltOlyMin", "00"));
					ALT_OLY_CPERIOD = Long.parseLong(altSettings.getProperty("AltOlyCPeriod", "21600")) * 1000;
					ALT_OLY_BATTLE = Long.parseLong(altSettings.getProperty("AltOlyBattle", "360")) * 1000;
					ALT_OLY_BWAIT = Long.parseLong(altSettings.getProperty("AltOlyBWait", "600")) * 1000;
					ALT_OLY_IWAIT = Long.parseLong(altSettings.getProperty("AltOlyIWait", "300")) * 1000;
					ALT_OLY_WPERIOD = Long.parseLong(altSettings.getProperty("AltOlyWPeriod", "604800")) * 1000;
					ALT_OLY_VPERIOD = Long.parseLong(altSettings.getProperty("AltOlyVPeriod", "86400")) * 1000;
					ALT_OLY_CLASSED = Integer.parseInt(altSettings.getProperty("AltOlyClassedParticipants", "5"));
					ALT_OLY_NONCLASSED = Integer.parseInt(altSettings.getProperty("AltOlyNonClassedParticipants", "9"));
					ALT_OLY_BATTLE_REWARD_ITEM = Integer.parseInt(altSettings.getProperty("AltOlyBattleRewItem", "6651"));
					ALT_OLY_CLASSED_RITEM_C = Integer.parseInt(altSettings.getProperty("AltOlyClassedRewItemCount", "50"));
					ALT_OLY_NONCLASSED_RITEM_C = Integer.parseInt(altSettings.getProperty("AltOlyNonClassedRewItemCount", "30"));
					ALT_OLY_COMP_RITEM = Integer.parseInt(altSettings.getProperty("AltOlyCompRewItem", "6651"));
					ALT_OLY_GP_PER_POINT = Integer.parseInt(altSettings.getProperty("AltOlyGPPerPoint", "1000"));
					ALT_OLY_MIN_POINT_FOR_EXCH = Integer.parseInt(altSettings.getProperty("AltOlyMinPointForExchange", "50"));
					ALT_OLY_HERO_POINTS = Integer.parseInt(altSettings.getProperty("AltOlyHeroPoints", "300"));
					OLY_ENCHANT_LIMIT = Integer.parseInt(altSettings.getProperty("AltOlyMaxEnchant", "-1"));
					ALT_OLY_RESTRICTED_ITEMS = altSettings.getProperty("AltOlyRestrictedItems", "0");
					LIST_OLY_RESTRICTED_ITEMS = new FastList<Integer>();
					for (String id : ALT_OLY_RESTRICTED_ITEMS.split(",")) LIST_OLY_RESTRICTED_ITEMS.add(Integer.parseInt(id));
					ALT_OLY_SAME_IP = Boolean.parseBoolean(altSettings.getProperty("AltOlyDualBox", "True"));

					ALT_GAME_REQUIRE_CASTLE_DAWN = Boolean.parseBoolean(altSettings.getProperty("AltRequireCastleForDawn", "False"));
					ALT_GAME_REQUIRE_CLAN_CASTLE = Boolean.parseBoolean(altSettings.getProperty("AltRequireClanCastle", "False"));
					ALT_FESTIVAL_MIN_PLAYER = Integer.parseInt(altSettings.getProperty("AltFestivalMinPlayer", "5"));
					ALT_MAXIMUM_PLAYER_CONTRIB = Integer.parseInt(altSettings.getProperty("AltMaxPlayerContrib", "1000000"));
					ALT_FESTIVAL_MANAGER_START = Long.parseLong(altSettings.getProperty("AltFestivalManagerStart", "120000"));
					ALT_FESTIVAL_LENGTH = Long.parseLong(altSettings.getProperty("AltFestivalLength", "1080000"));
					ALT_FESTIVAL_CYCLE_LENGTH = Long.parseLong(altSettings.getProperty("AltFestivalCycleLength", "2280000"));
					ALT_FESTIVAL_FIRST_SPAWN = Long.parseLong(altSettings.getProperty("AltFestivalFirstSpawn", "120000"));
					ALT_FESTIVAL_FIRST_SWARM = Long.parseLong(altSettings.getProperty("AltFestivalFirstSwarm", "300000"));
					ALT_FESTIVAL_SECOND_SPAWN = Long.parseLong(altSettings.getProperty("AltFestivalSecondSpawn", "540000"));
					ALT_FESTIVAL_SECOND_SWARM = Long.parseLong(altSettings.getProperty("AltFestivalSecondSwarm", "720000"));
					ALT_FESTIVAL_CHEST_SPAWN = Long.parseLong(altSettings.getProperty("AltFestivalChestSpawn", "900000"));

					ALT_LOTTERY_PRIZE = Integer.parseInt(altSettings.getProperty("AltLotteryPrize", "50000"));
					ALT_LOTTERY_TICKET_PRICE = Integer.parseInt(altSettings.getProperty("AltLotteryTicketPrice", "2000"));
					ALT_LOTTERY_5_NUMBER_RATE = Float.parseFloat(altSettings.getProperty("AltLottery5NumberRate", "0.6"));
					ALT_LOTTERY_4_NUMBER_RATE = Float.parseFloat(altSettings.getProperty("AltLottery4NumberRate", "0.2"));
					ALT_LOTTERY_3_NUMBER_RATE = Float.parseFloat(altSettings.getProperty("AltLottery3NumberRate", "0.2"));
					ALT_LOTTERY_2_AND_1_NUMBER_PRIZE = Integer.parseInt(altSettings.getProperty("AltLottery2and1NumberPrize", "200"));
				} 
				catch (Exception e)
				{
					e.printStackTrace();
					throw new Error("Failed to Load " + ALT_SETTINGS_FILE + " File.");
				}
				
				try 
				{
					Properties ChatFilter = new Properties();
					is = new FileInputStream(new File(CHAT_FILTER_FILE));
					ChatFilter.load(is);
					LineNumberReader lnr = new LineNumberReader(new BufferedReader(new FileReader(new File(CHAT_FILTER_FILE))));
					String line = null;
					while ((line = lnr.readLine()) != null) 
					{
						if (line.trim().length() == 0 || line.startsWith("#"))
							continue;

						FILTER_LIST.add(line.trim());
					}
					_log.info("Loaded " + FILTER_LIST.size() + " Filter Words.");
				}
				catch (Exception e) 
				{
					e.printStackTrace();
					throw new Error("Failed to Load " + CHAT_FILTER_FILE + " File.");
				}
				try 
				{
					Properties FloodProtector = new Properties();
					is = new FileInputStream(new File(FLOODPROTECTOR_CONFIG_FILE));
					FloodProtector.load(is);
					
					loadFloodProtectorConfigs(FloodProtector);
				} 
				catch (Exception e) 
				{
					e.printStackTrace();
					throw new Error("Failed to Load " + FLOODPROTECTOR_CONFIG_FILE + " File.");
				}
				try 
				{
					Properties gmSettings = new Properties();
					is = new FileInputStream(new File(GM_ACCESS_FILE));
					gmSettings.load(is);

					EVERYBODY_HAS_ADMIN_RIGHTS = Boolean
							.parseBoolean(gmSettings.getProperty(
									"EverybodyHasAdminRights", "False"));
					GM_ACCESSLEVEL = Integer.parseInt(gmSettings.getProperty(
							"GMAccessLevel", "100"));
					GM_MIN = Integer.parseInt(gmSettings.getProperty(
							"GMMinLevel", "100"));
					GM_ALTG_MIN_LEVEL = Integer.parseInt(gmSettings
							.getProperty("GMCanAltG", "100"));
					GM_ANNOUNCE = Integer.parseInt(gmSettings.getProperty(
							"GMCanAnnounce", "100"));
					GM_BAN = Integer.parseInt(gmSettings.getProperty(
							"GMCanBan", "100"));
					GM_BAN_CHAT = Integer.parseInt(gmSettings.getProperty(
							"GMCanBanChat", "100"));
					GM_CREATE_ITEM = Integer.parseInt(gmSettings.getProperty(
							"GMCanShop", "100"));
					GM_DELETE = Integer.parseInt(gmSettings.getProperty(
							"GMCanDelete", "100"));
					GM_KICK = Integer.parseInt(gmSettings.getProperty(
							"GMCanKick", "100"));
					GM_MENU = Integer.parseInt(gmSettings.getProperty("GMMenu",
							"100"));
					GM_GODMODE = Integer.parseInt(gmSettings.getProperty(
							"GMGodMode", "100"));
					GM_CHAR_EDIT = Integer.parseInt(gmSettings.getProperty(
							"GMCanEditChar", "100"));
					GM_CHAR_EDIT_OTHER = Integer.parseInt(gmSettings
							.getProperty("GMCanEditCharOther", "100"));
					GM_CHAR_VIEW = Integer.parseInt(gmSettings.getProperty(
							"GMCanViewChar", "100"));
					GM_NPC_EDIT = Integer.parseInt(gmSettings.getProperty(
							"GMCanEditNPC", "100"));
					GM_NPC_VIEW = Integer.parseInt(gmSettings.getProperty(
							"GMCanViewNPC", "100"));
					GM_PRIV_EDIT = Integer.parseInt(gmSettings.getProperty(
							"GMCanEditPriv", "100"));
					GM_PRIV_VIEW = Integer.parseInt(gmSettings.getProperty(
							"GMCanViewPriv", "100"));
					GM_TELEPORT = Integer.parseInt(gmSettings.getProperty(
							"GMCanTeleport", "100"));
					GM_TELEPORT_OTHER = Integer.parseInt(gmSettings
							.getProperty("GMCanTeleportOther", "100"));
					GM_RESTART = Integer.parseInt(gmSettings.getProperty(
							"GMCanRestart", "100"));
					GM_MONSTERRACE = Integer.parseInt(gmSettings.getProperty(
							"GMMonsterRace", "100"));
					GM_RIDER = Integer.parseInt(gmSettings.getProperty(
							"GMRider", "100"));
					GM_ESCAPE = Integer.parseInt(gmSettings.getProperty(
							"GMFastUnstuck", "100"));
					GM_FIXED = Integer.parseInt(gmSettings.getProperty(
							"GMResurectFixed", "100"));
					GM_CREATE_NODES = Integer.parseInt(gmSettings.getProperty(
							"GMCreateNodes", "100"));
					GM_ENCHANT = Integer.parseInt(gmSettings.getProperty(
							"GMEnchant", "100"));
					GM_DOOR = Integer.parseInt(gmSettings.getProperty("GMDoor",
							"100"));
					GM_RES = Integer.parseInt(gmSettings.getProperty("GMRes",
							"100"));
					GM_PEACEATTACK = Integer.parseInt(gmSettings.getProperty(
							"GMPeaceAttack", "100"));
					GM_HEAL = Integer.parseInt(gmSettings.getProperty("GMHeal",
							"100"));
					GM_UNBLOCK = Integer.parseInt(gmSettings.getProperty(
							"GMUnblock", "100"));
					GM_CACHE = Integer.parseInt(gmSettings.getProperty(
							"GMCache", "100"));
					GM_TALK_BLOCK = Integer.parseInt(gmSettings.getProperty(
							"GMTalkBlock", "100"));
					GM_TEST = Integer.parseInt(gmSettings.getProperty("GMTest",
							"100"));
					GM_FORTSIEGE = Integer.parseInt(gmSettings.getProperty(
							"GMFortSiege", "100"));
					GM_CLAN_PANEL = Integer.parseInt(gmSettings.getProperty(
							"GMClanPanel", "100"));
					String gmTrans = gmSettings.getProperty(
							"GMDisableTransaction", "False");
					if (!gmTrans.equalsIgnoreCase("False")) {
						String[] params = gmTrans.split(",");
						GM_DISABLE_TRANSACTION = true;
						GM_TRANSACTION_MIN = Integer.parseInt(params[0]);
						GM_TRANSACTION_MAX = Integer.parseInt(params[1]);
					} else
						GM_DISABLE_TRANSACTION = false;
					GM_ADMIN_MENU_STYLE = gmSettings.getProperty(
							"GMAdminMenuStyle", "modern");
					GM_CAN_GIVE_DAMAGE = Integer.parseInt(gmSettings
							.getProperty("GMCanGiveDamage", "90"));
					GM_DONT_TAKE_AGGRO = Integer.parseInt(gmSettings
							.getProperty("GMDontTakeAggro", "90"));
					GM_DONT_TAKE_EXPSP = Integer.parseInt(gmSettings
							.getProperty("GMDontGiveExpSp", "90"));
					ALT_PRIVILEGES_ADMIN = Boolean.parseBoolean(gmSettings
							.getProperty("AltPrivilegesAdmin", "False"));
					ALT_PRIVILEGES_SECURE_CHECK = Boolean
							.parseBoolean(gmSettings.getProperty(
									"AltPrivilegesSecureCheck", "True"));
					ALT_PRIVILEGES_DEFAULT_LEVEL = Integer.parseInt(gmSettings
							.getProperty("AltPrivilegesDefaultLevel", "100"));
					GM_NAME_COLOR_ENABLED = Boolean.parseBoolean(gmSettings
							.getProperty("GMNameColorEnabled", "False"));
					GM_NAME_COLOR = Integer.decode("0x"
							+ gmSettings.getProperty("GMNameColor", "FFFF00"));
					ADMIN_NAME_COLOR = Integer.decode("0x"
							+ gmSettings
									.getProperty("AdminNameColor", "00FF00"));
					GM_HERO_AURA = Boolean.parseBoolean(gmSettings.getProperty(
							"GMHeroAura", "True"));
					GM_STARTUP_INVULNERABLE = Boolean.parseBoolean(gmSettings
							.getProperty("GMStartupInvulnerable", "True"));
					GM_STARTUP_INVISIBLE = Boolean.parseBoolean(gmSettings
							.getProperty("GMStartupInvisible", "True"));
					MASTERACCESS_LEVEL = Integer.parseInt(gmSettings
							.getProperty("MasterAccessLevel", "1"));
					MASTERACCESS_NAME_COLOR = Integer.decode("0x"
							+ gmSettings.getProperty("MasterNameColor",
									"00FF00"));
					MASTERACCESS_TITLE_COLOR = Integer.decode("0x"
							+ gmSettings.getProperty("MasterTitleColor",
									"00FF00"));
					GM_STARTUP_SILENCE = Boolean.parseBoolean(gmSettings
							.getProperty("GMStartupSilence", "True"));
					GM_STARTUP_AUTO_LIST = Boolean.parseBoolean(gmSettings
							.getProperty("GMStartupAutoList", "True"));
				} catch (Exception e) {
					e.printStackTrace();
					throw new Error("Failed to Load " + GM_ACCESS_FILE
							+ " File.");
				}
				try {
					Properties idSettings = new Properties();
					is = new FileInputStream(new File(ID_CONFIG_FILE));
					idSettings.load(is);

					MAP_TYPE = ObjectMapType.valueOf(idSettings.getProperty(
							"L2Map", "WorldObjectMap"));
					SET_TYPE = ObjectSetType.valueOf(idSettings.getProperty(
							"L2Set", "WorldObjectSet"));
					IDFACTORY_TYPE = IdFactoryType.valueOf(idSettings
							.getProperty("IDFactory", "Compaction"));
					BAD_ID_CHECKING = Boolean.parseBoolean(idSettings
							.getProperty("BadIdChecking", "True"));
				} catch (Exception e) {
					e.printStackTrace();
					throw new Error("Failed to Load " + ID_CONFIG_FILE
							+ " File.");
				}
				try {
					Properties optionsSettings = new Properties();
					is = new FileInputStream(new File(OPTIONS_FILE));
					optionsSettings.load(is);

					USE_SAY_FILTER = Boolean.parseBoolean(optionsSettings
							.getProperty("UseChatFilter", "False"));
					CHAT_FILTER_CHARS = optionsSettings.getProperty(
							"ChatFilterChars", "***");
					CHAT_FILTER_PUNISHMENT = optionsSettings.getProperty(
							"ChatFilterPunishment", "off");
					CHAT_FILTER_PUNISHMENT_PARAM1 = Integer
							.parseInt(optionsSettings.getProperty(
									"ChatFilterPunishmentParam1", "1"));
					CHAT_FILTER_PUNISHMENT_PARAM2 = Integer
							.parseInt(optionsSettings.getProperty(
									"ChatFilterPunishmentParam2", "1"));
					DEFAULT_GLOBAL_CHAT = optionsSettings.getProperty(
							"GlobalChat", "ON");
					DEFAULT_TRADE_CHAT = optionsSettings.getProperty(
							"TradeChat", "ON");
					ONLINE_PLAYERS_AT_STARTUP = Boolean
							.parseBoolean(optionsSettings.getProperty(
									"ShowOnlinePlayersAtStartup", "False"));
					PLAYERS_ONLINE_TRICK = Integer.parseInt(optionsSettings
							.getProperty("OnlinePlayerCountTrick", "0"));
					ONLINE_PLAYERS_ANNOUNCE_INTERVAL = Integer
							.parseInt(optionsSettings.getProperty(
									"OnlinePlayersAnnounceInterval", "900000"));

					CUSTOM_SPAWNLIST_TABLE = Boolean
							.parseBoolean(optionsSettings.getProperty(
									"CustomSpawnlistTable", "False"));
					SAVE_GMSPAWN_ON_CUSTOM = Boolean
							.parseBoolean(optionsSettings.getProperty(
									"SaveGmSpawnOnCustom", "False"));
					DELETE_GMSPAWN_ON_CUSTOM = Boolean
							.parseBoolean(optionsSettings.getProperty(
									"DeleteGmSpawnOnCustom", "False"));
					CUSTOM_NPC_TABLE = Boolean.parseBoolean(optionsSettings
							.getProperty("CustomNpcTable", "False"));
					CUSTOM_ETCITEM_TABLE = Boolean.parseBoolean(optionsSettings
							.getProperty("CustomEtcitemTable", "False"));
					CUSTOM_ARMOR_TABLE = Boolean.parseBoolean(optionsSettings
							.getProperty("CustomArmorTable", "False"));
					CUSTOM_ARMORSETS_TABLE = Boolean
							.parseBoolean(optionsSettings.getProperty(
									"CustomArmorSetsTable", "False"));
					CUSTOM_WEAPON_TABLE = Boolean.parseBoolean(optionsSettings
							.getProperty("CustomWeaponTable", "False"));
					CUSTOM_TELEPORT_TABLE = Boolean
							.parseBoolean(optionsSettings.getProperty(
									"CustomTeleportTable", "False"));
					CUSTOM_DROPLIST_TABLE = Boolean
							.parseBoolean(optionsSettings.getProperty(
									"CustomDroplistTable", "False"));
					CUSTOM_MERCHANT_TABLES = Boolean
							.parseBoolean(optionsSettings.getProperty(
									"CustomMerchantTables", "False"));

					ALLOW_L2WALKER_PROTECTION = Boolean
							.parseBoolean(optionsSettings.getProperty(
									"L2WalkerProtection", "False"));
					SHOW_HTML_WELCOME = Boolean.parseBoolean(optionsSettings
							.getProperty("ShowInfo", "True"));

					AUTODESTROY_ITEM_AFTER = Integer.parseInt(optionsSettings
							.getProperty("AutoDestroyDroppedItemAfter", "0"));
					HERB_AUTO_DESTROY_TIME = Integer.parseInt(optionsSettings
							.getProperty("AutoDestroyHerbTime", "15")) * 1000;
					PROTECTED_ITEMS = optionsSettings
							.getProperty("ListOfProtectedItems");
					LIST_PROTECTED_ITEMS = new FastList<Integer>();
					for (String id : PROTECTED_ITEMS.split(","))
						LIST_PROTECTED_ITEMS.add(Integer.parseInt(id));
					DESTROY_DROPPED_PLAYER_ITEM = Boolean
							.parseBoolean(optionsSettings.getProperty(
									"DestroyPlayerDroppedItem", "False"));
					DESTROY_EQUIPABLE_PLAYER_ITEM = Boolean
							.parseBoolean(optionsSettings.getProperty(
									"DestroyEquipableItem", "False"));
					SAVE_DROPPED_ITEM = Boolean.parseBoolean(optionsSettings
							.getProperty("SaveDroppedItem", "False"));
					EMPTY_DROPPED_ITEM_TABLE_AFTER_LOAD = Boolean
							.parseBoolean(optionsSettings.getProperty(
									"EmptyDroppedItemTableAfterLoad", "False"));
					SAVE_DROPPED_ITEM_INTERVAL = Integer
							.parseInt(optionsSettings.getProperty(
									"SaveDroppedItemInterval", "0")) * 60000;
					CLEAR_DROPPED_ITEM_TABLE = Boolean
							.parseBoolean(optionsSettings.getProperty(
									"ClearDroppedItemTable", "False"));
					PRECISE_DROP_CALCULATION = Boolean
							.parseBoolean(optionsSettings.getProperty(
									"PreciseDropCalculation", "True"));
					MULTIPLE_ITEM_DROP = Boolean.parseBoolean(optionsSettings
							.getProperty("MultipleItemDrop", "True"));
					COORD_SYNCHRONIZE = Integer.parseInt(optionsSettings
							.getProperty("CoordSynchronize", "-1"));
					ONLY_GM_ITEMS_FREE = Boolean.parseBoolean(optionsSettings
							.getProperty("OnlyGMItemsFree", "True"));
					ALLOW_WAREHOUSE = Boolean.parseBoolean(optionsSettings
							.getProperty("AllowWarehouse", "True"));
					WAREHOUSE_CACHE = Boolean.parseBoolean(optionsSettings
							.getProperty("WarehouseCache", "False"));
					WAREHOUSE_CACHE_TIME = Integer.parseInt(optionsSettings
							.getProperty("WarehouseCacheTime", "15"));
					ALLOW_FREIGHT = Boolean.parseBoolean(optionsSettings
							.getProperty("AllowFreight", "True"));
					ALLOW_WEAR = Boolean.parseBoolean(optionsSettings
							.getProperty("AllowWear", "False"));
					WEAR_DELAY = Integer.parseInt(optionsSettings.getProperty(
							"WearDelay", "5"));
					WEAR_PRICE = Integer.parseInt(optionsSettings.getProperty(
							"WearPrice", "10"));
					ALLOW_LOTTERY = Boolean.parseBoolean(optionsSettings
							.getProperty("AllowLottery", "False"));
					ALLOW_RACE = Boolean.parseBoolean(optionsSettings
							.getProperty("AllowRace", "False"));
					ALLOW_WATER = Boolean.parseBoolean(optionsSettings
							.getProperty("AllowWater", "False"));
					ALLOW_FISHING = Boolean.parseBoolean(optionsSettings
							.getProperty("AllowFishing_2", "False"));
					ALLOW_RENTPET = Boolean.parseBoolean(optionsSettings
							.getProperty("AllowRentPet", "False"));
					FLOODPROTECTOR_INITIALSIZE = Integer
							.parseInt(optionsSettings.getProperty(
									"FloodProtectorInitialSize", "50"));
					ALLOW_DISCARDITEM = Boolean.parseBoolean(optionsSettings
							.getProperty("AllowDiscardItem", "True"));
					ALLOWFISHING = Boolean.parseBoolean(optionsSettings
							.getProperty("AllowFishing", "False"));
					ALLOW_BOAT = Boolean.parseBoolean(optionsSettings
							.getProperty("AllowBoat", "False"));
					ALLOW_CURSED_WEAPONS = Boolean.parseBoolean(optionsSettings
							.getProperty("AllowCursedWeapons", "False"));
					ALLOW_NPC_WALKERS = Boolean.parseBoolean(optionsSettings
							.getProperty("AllowNpcWalkers", "False"));
					LOG_CHAT = Boolean.parseBoolean(optionsSettings
							.getProperty("LogChat", "False"));
					LOG_ITEMS = Boolean.parseBoolean(optionsSettings
							.getProperty("LogItems", "False"));
					LOG_TRADES = Boolean.parseBoolean(optionsSettings
							.getProperty("LogTrades", "False"));
					LOG_PDAM = Boolean.parseBoolean(optionsSettings
							.getProperty("LogPdam", "False"));
					LOG_MDAM = Boolean.parseBoolean(optionsSettings
							.getProperty("LogMdam", "False"));
					GMAUDIT = Boolean.parseBoolean(optionsSettings.getProperty(
							"GMAudit", "False"));
					COMMUNITY_TYPE = optionsSettings.getProperty(
							"CommunityType", "old").toLowerCase();
					BBS_DEFAULT = optionsSettings.getProperty("BBSDefault",
							"_bbshome");
					SHOW_LEVEL_COMMUNITYBOARD = Boolean
							.parseBoolean(optionsSettings.getProperty(
									"ShowLevelOnCommunityBoard", "False"));
					SHOW_STATUS_COMMUNITYBOARD = Boolean
							.parseBoolean(optionsSettings.getProperty(
									"ShowStatusOnCommunityBoard", "True"));
					NAME_PAGE_SIZE_COMMUNITYBOARD = Integer
							.parseInt(optionsSettings.getProperty(
									"NamePageSizeOnCommunityBoard", "50"));
					NAME_PER_ROW_COMMUNITYBOARD = Integer
							.parseInt(optionsSettings.getProperty(
									"NamePerRowOnCommunityBoard", "5"));
					ZONE_TOWN = Integer.parseInt(optionsSettings.getProperty(
							"ZoneTown", "0"));
					MAX_DRIFT_RANGE = Integer.parseInt(optionsSettings
							.getProperty("MaxDriftRange", "300"));
					AUTODELETE_INVALID_QUEST_DATA = Boolean
							.parseBoolean(optionsSettings.getProperty(
									"AutoDeleteInvalidQuestData", "False"));
					THREAD_P_EFFECTS = Integer.parseInt(optionsSettings
							.getProperty("ThreadPoolSizeEffects", "6"));
					THREAD_P_GENERAL = Integer.parseInt(optionsSettings
							.getProperty("ThreadPoolSizeGeneral", "15"));
					GENERAL_PACKET_THREAD_CORE_SIZE = Integer
							.parseInt(optionsSettings.getProperty(
									"GeneralPacketThreadCoreSize", "4"));
					IO_PACKET_THREAD_CORE_SIZE = Integer
							.parseInt(optionsSettings.getProperty(
									"UrgentPacketThreadCoreSize", "2"));
					AI_MAX_THREAD = Integer.parseInt(optionsSettings
							.getProperty("AiMaxThread", "10"));
					GENERAL_THREAD_CORE_SIZE = Integer.parseInt(optionsSettings
							.getProperty("GeneralThreadCoreSize", "4"));
					DEFAULT_PUNISH = Integer.parseInt(optionsSettings
							.getProperty("DefaultPunish", "2"));
					DEFAULT_PUNISH_PARAM = Integer.parseInt(optionsSettings
							.getProperty("DefaultPunishParam", "0"));
					LAZY_CACHE = Boolean.parseBoolean(optionsSettings
							.getProperty("LazyCache", "False"));
					PACKET_LIFETIME = Integer.parseInt(optionsSettings
							.getProperty("PacketLifeTime", "0"));
					BYPASS_VALIDATION = Boolean.parseBoolean(optionsSettings
							.getProperty("BypassValidation", "True"));
					GAMEGUARD_ENFORCE = Boolean.parseBoolean(optionsSettings
							.getProperty("GameGuardEnforce", "False"));
					GAMEGUARD_PROHIBITACTION = Boolean
							.parseBoolean(optionsSettings.getProperty(
									"GameGuardProhibitAction", "False"));
					GRIDS_ALWAYS_ON = Boolean.parseBoolean(optionsSettings
							.getProperty("GridsAlwaysOn", "False"));
					GRID_NEIGHBOR_TURNON_TIME = Integer
							.parseInt(optionsSettings.getProperty(
									"GridNeighborTurnOnTime", "1"));
					GRID_NEIGHBOR_TURNOFF_TIME = Integer
							.parseInt(optionsSettings.getProperty(
									"GridNeighborTurnOffTime", "90"));
					GEODATA = Integer.parseInt(optionsSettings.getProperty(
							"GeoData", "0"));
					FORCE_GEODATA = Boolean.parseBoolean(optionsSettings
							.getProperty("ForceGeoData", "True"));
					MOVE_BASED_KNOWNLIST = Boolean.parseBoolean(optionsSettings
							.getProperty("MoveBasedKnownlist", "False"));
					KNOWNLIST_UPDATE_INTERVAL = Long.parseLong(optionsSettings
							.getProperty("KnownListUpdateInterval", "1250"));
					ACCEPT_GEOEDITOR_CONN = Boolean
							.parseBoolean(optionsSettings.getProperty(
									"AcceptGeoeditorConn", "False"));
					USE_3D_MAP = Boolean.parseBoolean(optionsSettings
							.getProperty("Use3DMap", "False"));
					PATH_NODE_RADIUS = Integer.parseInt(optionsSettings
							.getProperty("PathNodeRadius", "50"));
					NEW_NODE_ID = Integer.parseInt(optionsSettings.getProperty(
							"NewNodeId", "7952"));
					SELECTED_NODE_ID = Integer.parseInt(optionsSettings
							.getProperty("NewNodeId", "7952"));
					LINKED_NODE_ID = Integer.parseInt(optionsSettings
							.getProperty("NewNodeId", "7952"));
					NEW_NODE_TYPE = optionsSettings.getProperty("NewNodeType",
							"npc");
					COUNT_PACKETS = Boolean.parseBoolean(optionsSettings
							.getProperty("CountPacket", "False"));
					DUMP_PACKET_COUNTS = Boolean.parseBoolean(optionsSettings
							.getProperty("DumpPacketCounts", "False"));
					DUMP_INTERVAL_SECONDS = Integer.parseInt(optionsSettings
							.getProperty("PacketDumpInterval", "60"));
					MINIMUM_UPDATE_DISTANCE = Integer.parseInt(optionsSettings
							.getProperty("MaximumUpdateDistance", "50"));
					MINIMUN_UPDATE_TIME = Integer.parseInt(optionsSettings
							.getProperty("MinimumUpdateTime", "500"));
					CHECK_KNOWN = Boolean.parseBoolean(optionsSettings
							.getProperty("CheckKnownList", "False"));
					KNOWNLIST_FORGET_DELAY = Integer.parseInt(optionsSettings
							.getProperty("KnownListForgetDelay", "10000"));
					DEEPBLUE_DROP_RULES = Boolean.parseBoolean(optionsSettings
							.getProperty("UseDeepBlueDropRules", "True"));
					NONDROPPABLE_ITEMS = optionsSettings.getProperty(
							"ListOfNonDroppableItems",
							"1147,425,1146,461,10,2368,7,6,2370,2369,5598");
					LIST_NONDROPPABLE_ITEMS = new FastList<Integer>();
					for (String id : NONDROPPABLE_ITEMS.split(","))
						LIST_NONDROPPABLE_ITEMS.add(Integer.parseInt(id));
					PETITIONING_ALLOWED = Boolean.parseBoolean(optionsSettings
							.getProperty("PetitioningAllowed", "True"));
					MAX_PETITIONS_PER_PLAYER = Integer.parseInt(optionsSettings
							.getProperty("MaxPetitionsPerPlayer", "5"));
					MAX_PETITIONS_PENDING = Integer.parseInt(optionsSettings
							.getProperty("MaxPetitionsPending", "25"));
					JAIL_IS_PVP = Boolean.parseBoolean(optionsSettings
							.getProperty("JailIsPvp", "True"));
					JAIL_DISABLE_CHAT = Boolean.parseBoolean(optionsSettings
							.getProperty("JailDisableChat", "True"));
				} catch (Exception e) {
					e.printStackTrace();
					throw new Error("Failed to Load " + OPTIONS_FILE + " File.");
				}
				try 
				{
					Properties player = new Properties();
					is = new FileInputStream(new File(PLAYERS_CONFIG_FILE));
					player.load(is);

					try 
					{
						CNAME_PATTERN = Pattern.compile(player.getProperty("CnameTemplate", "[A-Za-z0-9\\-]{3,16}"));
					}
					catch (PatternSyntaxException e) 
					{
						_log.warning("GameServer: Character name pattern is wrong!");
						CNAME_PATTERN = Pattern.compile("[A-Za-z0-9\\-]{3,16}");
					}

					TOGGLE_WEAPON_ALLOWED = Boolean.parseBoolean(player.getProperty("ToggleWeaponIsAllowed", "True"));
					FAILD_FAKEDEATH = Boolean.parseBoolean(player.getProperty("FaildFakeDeath", "True"));
					ALT_MINIMUM_FALL_HEIGHT = Integer.parseInt(player.getProperty("AltMinimumFallHeight", "400"));
					ENABLE_WAREHOUSESORTING_CLAN = Boolean.parseBoolean(player.getProperty("EnableWarehouseSortingClan", "False"));
					ENABLE_WAREHOUSESORTING_PRIVATE = Boolean.parseBoolean(player.getProperty("EnableWarehouseSortingPrivate", "False"));
					ENABLE_WAREHOUSESORTING_FREIGHT = Boolean.parseBoolean(player.getProperty("EnableWarehouseSortingFreight", "False"));
					ES_SP_BOOK_NEEDED = Boolean.parseBoolean(player.getProperty("EnchantSkillSpBookNeeded", "True"));
					ALT_GAME_TIREDNESS = Boolean.parseBoolean(player.getProperty("AltGameTiredness", "False"));
					ALT_GAME_CANCEL_BOW = player.getProperty("AltGameCancelByHit", "Cast").equalsIgnoreCase("bow")|| player.getProperty("AltGameCancelByHit", "Cast").equalsIgnoreCase("all");
					ALT_GAME_CANCEL_CAST = player.getProperty("AltGameCancelByHit", "Cast").equalsIgnoreCase("cast") || player.getProperty("AltGameCancelByHit", "Cast").equalsIgnoreCase("all");
					ALT_GAME_SHIELD_BLOCKS = Boolean.parseBoolean(player.getProperty("AltShieldBlocks", "False"));
					ALT_PERFECT_SHLD_BLOCK = Integer.parseInt(player.getProperty("AltPerfectShieldBlockRate", "5"));
					ALT_GAME_DELEVEL = Boolean.parseBoolean(player.getProperty("Delevel", "True"));
					ALT_GAME_MAGICFAILURES = Boolean.parseBoolean(player.getProperty("MagicFailures", "False"));
					ALT_GAME_EXPONENT_XP = Float.parseFloat(player.getProperty("AltGameExponentXp", "0."));
					ALT_GAME_EXPONENT_SP = Float.parseFloat(player.getProperty("AltGameExponentSp", "0."));
					ALT_GAME_FREIGHTS = Boolean.parseBoolean(player.getProperty("AltGameFreights", "False"));
					ALT_GAME_FREIGHT_PRICE = Integer.parseInt(player.getProperty("AltGameFreightPrice", "1000"));
					ALT_WEIGHT_LIMIT = Double.parseDouble(player.getProperty("AltWeightLimit", "1"));
					ALT_GAME_KARMA_PLAYER_CAN_BE_KILLED_IN_PEACEZONE = Boolean.parseBoolean(player.getProperty("AltKarmaPlayerCanBeKilledInPeaceZone","False"));
					ALT_GAME_KARMA_PLAYER_CAN_SHOP = Boolean.parseBoolean(player.getProperty("AltKarmaPlayerCanShop", "True"));
					ALT_GAME_KARMA_PLAYER_CAN_USE_GK = Boolean.parseBoolean(player.getProperty("AltKarmaPlayerCanUseGK", "False"));
					ALT_GAME_KARMA_PLAYER_CAN_TELEPORT = Boolean.parseBoolean(player.getProperty("AltKarmaPlayerCanTeleport", "True"));
					ALT_GAME_KARMA_PLAYER_CAN_TRADE = Boolean.parseBoolean(player.getProperty("AltKarmaPlayerCanTrade", "True"));
					ALT_GAME_KARMA_PLAYER_CAN_USE_WAREHOUSE = Boolean.parseBoolean(player.getProperty("AltKarmaPlayerCanUseWareHouse", "True"));
					ALT_GAME_FREE_TELEPORT = Boolean.parseBoolean(player.getProperty("AltFreeTeleporting", "False"));
					ALT_RECOMMEND = Boolean.parseBoolean(player.getProperty("AltRecommend", "False"));

					AUTO_LOOT = Boolean.parseBoolean(player.getProperty("AutoLoot", "True"));
					AUTO_LOOT_RAID = Boolean.valueOf(player.getProperty("AutoLootRaid", "True"));
					AUTO_LOOT_HERBS = Boolean.parseBoolean(player.getProperty("AutoLootHerbs", "True"));

					ALT_GAME_SKILL_LEARN = Boolean.parseBoolean(player.getProperty("AltGameSkillLearn", "False"));
					SP_BOOK_NEEDED = Boolean.parseBoolean(player.getProperty("SpBookNeeded", "true"));
					AUTO_LEARN_SKILLS = Boolean.parseBoolean(player.getProperty("AutoLearnSkills", "False"));

					ALT_GAME_SUBCLASS_WITHOUT_QUESTS = Boolean.parseBoolean(player.getProperty("AltSubClassWithoutQuests", "False"));
					SUBCLASS_WITH_ITEM_AND_NO_QUEST = Boolean.parseBoolean(player.getProperty("SubclassWithItemAndNoQuest", "False"));
					RESTORE_EFFECTS_ON_SUBCLASS_CHANGE = Boolean.parseBoolean(player.getProperty("RestoreEffectsOnSubClassChange", "False"));
					CUSTOM_SUBCLASS_LVL = Integer.parseInt(player.getProperty("CustomSubclassLvl", "40"));
					MAX_SUBCLASSES = Integer.parseInt(player.getProperty("MaxSubClasses", "3"));
					KEEP_SUBCLASS_SKILLS = Boolean.parseBoolean(player.getProperty("KeepSubClassSkills", "False"));

					KARMA_MIN_KARMA = Integer.parseInt(player.getProperty(
							"MinKarma", "240"));
					KARMA_MAX_KARMA = Integer.parseInt(player.getProperty(
							"MaxKarma", "10000"));
					KARMA_XP_DIVIDER = Integer.parseInt(player.getProperty(
							"XPDivider", "260"));
					KARMA_LOST_BASE = Integer.parseInt(player.getProperty(
							"BaseKarmaLost", "0"));
					KARMA_DROP_GM = Boolean.parseBoolean(player.getProperty(
							"CanGMDropEquipment", "False"));
					KARMA_AWARD_PK_KILL = Boolean.parseBoolean(player
							.getProperty("AwardPKKillPVPPoint", "True"));
					KARMA_PK_LIMIT = Integer.parseInt(player.getProperty(
							"MinimumPKRequiredToDrop", "5"));
					KARMA_NONDROPPABLE_PET_ITEMS = player
							.getProperty("ListOfPetItems",
									"2375,3500,3501,3502,4422,4423,4424,4425,6648,6649,6650");
					KARMA_NONDROPPABLE_ITEMS = player
							.getProperty(
									"ListOfNonDroppableItems",
									"57,1147,425,1146,461,10,2368,7,6,2370,2369,6842,6611,6612,6613,6614,6615,6616,6617,6618,6619,6620,6621");
					KARMA_LIST_NONDROPPABLE_PET_ITEMS = new FastList<Integer>();
					for (String id : KARMA_NONDROPPABLE_PET_ITEMS.split(","))
						KARMA_LIST_NONDROPPABLE_PET_ITEMS.add(Integer
								.parseInt(id));
					KARMA_LIST_NONDROPPABLE_ITEMS = new FastList<Integer>();
					for (String id : KARMA_NONDROPPABLE_ITEMS.split(","))
						KARMA_LIST_NONDROPPABLE_ITEMS.add(Integer.parseInt(id));
					PVP_NORMAL_TIME = Integer.parseInt(player.getProperty(
							"PvPVsNormalTime", "15000"));
					PVP_PVP_TIME = Integer.parseInt(player.getProperty(
							"PvPVsPvPTime", "30000"));
					DISABLE_SUMMON_IN_COMBAT = Boolean.parseBoolean(player
							.getProperty("DisableSummonInCombat", "True"));
					ALLOW_PVP_REWARD = Boolean.parseBoolean(player.getProperty(
							"AllowPvpRewardSystem", "False"));
					PVP_REWARD_ITEM = Integer.parseInt(player.getProperty(
							"PvpRewardItem", "57"));
					PVP_REWARD_COUNT = Integer.parseInt(player.getProperty(
							"PvpRewardAmount", "1"));
					PVP_NO_ESCAPE = Boolean.parseBoolean(player.getProperty(
							"UseEscapeInPvP", "False"));
					PVP_SAME_IP = Boolean.parseBoolean(player.getProperty(
							"PvPSameIP", "False"));

					AUGMENTATION_BASESTAT_CHANCE = Integer.parseInt(player
							.getProperty("AugmentationBaseStatChance", "1"));
					AUGMENTATION_NG_SKILL_CHANCE = Integer.parseInt(player
							.getProperty("AugmentationNGSkillChance", "15"));
					AUGMENTATION_NG_GLOW_CHANCE = Integer.parseInt(player
							.getProperty("AugmentationNGGlowChance", "0"));
					AUGMENTATION_MID_SKILL_CHANCE = Integer.parseInt(player
							.getProperty("AugmentationMidSkillChance", "30"));
					AUGMENTATION_MID_GLOW_CHANCE = Integer.parseInt(player
							.getProperty("AugmentationMidGlowChance", "40"));
					AUGMENTATION_HIGH_SKILL_CHANCE = Integer.parseInt(player
							.getProperty("AugmentationHighSkillChance", "45"));
					AUGMENTATION_HIGH_GLOW_CHANCE = Integer.parseInt(player
							.getProperty("AugmentationHighGlowChance", "70"));
					AUGMENTATION_TOP_SKILL_CHANCE = Integer.parseInt(player
							.getProperty("AugmentationTopSkillChance", "60"));
					AUGMENTATION_TOP_GLOW_CHANCE = Integer.parseInt(player
							.getProperty("AugmentationTopGlowChance", "100"));

					ALT_PARTY_RANGE = Integer.parseInt(player.getProperty(
							"AltPartyRange", "1600"));
					ALT_PARTY_RANGE2 = Integer.parseInt(player.getProperty(
							"AltPartyRange2", "1400"));
					PARTY_XP_CUTOFF_METHOD = player.getProperty(
							"PartyXpCutoffMethod", "percentage");
					PARTY_XP_CUTOFF_PERCENT = Double.parseDouble(player
							.getProperty("PartyXpCutoffPercent", "3."));
					PARTY_XP_CUTOFF_LEVEL = Integer.parseInt(player
							.getProperty("PartyXpCutoffLevel", "30"));
					INVENTORY_MAXIMUM_NO_DWARF = Integer.parseInt(player
							.getProperty("MaximumSlotsForNoDwarf", "80"));
					INVENTORY_MAXIMUM_DWARF = Integer.parseInt(player
							.getProperty("MaximumSlotsForDwarf", "100"));
					INVENTORY_MAXIMUM_GM = Integer.parseInt(player.getProperty(
							"MaximumSlotsForGMPlayer", "250"));
					MAX_ITEM_IN_PACKET = Math.max(INVENTORY_MAXIMUM_NO_DWARF,
							Math.max(INVENTORY_MAXIMUM_DWARF,
									INVENTORY_MAXIMUM_GM));
					WAREHOUSE_SLOTS_NO_DWARF = Integer.parseInt(player
							.getProperty("MaximumWarehouseSlotsForNoDwarf",
									"100"));
					WAREHOUSE_SLOTS_DWARF = Integer
							.parseInt(player.getProperty(
									"MaximumWarehouseSlotsForDwarf", "120"));
					WAREHOUSE_SLOTS_CLAN = Integer.parseInt(player.getProperty(
							"MaximumWarehouseSlotsForClan", "150"));
					FREIGHT_SLOTS = Integer.parseInt(player.getProperty(
							"MaximumFreightSlots", "20"));
					HP_REGEN_MULTIPLIER = Double.parseDouble(player
							.getProperty("HpRegenMultiplier", "100")) / 100;
					MP_REGEN_MULTIPLIER = Double.parseDouble(player
							.getProperty("MpRegenMultiplier", "100")) / 100;
					CP_REGEN_MULTIPLIER = Double.parseDouble(player
							.getProperty("CpRegenMultiplier", "100")) / 100;
					STARTING_ADENA = Integer.parseInt(player.getProperty(
							"StartingAdena", "0"));
					STARTING_AA = Integer.parseInt(player.getProperty(
							"StartingAA", "0"));
					UNSTUCK_INTERVAL = Integer.parseInt(player.getProperty(
							"UnstuckInterval", "300"));
					PLAYER_SPAWN_PROTECTION = Integer.parseInt(player
							.getProperty("PlayerSpawnProtection", "0"));
					RESPAWN_RESTORE_CP = Double.parseDouble(player.getProperty(
							"RespawnRestoreCP", "0")) / 100;
					RESPAWN_RESTORE_HP = Double.parseDouble(player.getProperty(
							"RespawnRestoreHP", "70")) / 100;
					RESPAWN_RESTORE_MP = Double.parseDouble(player.getProperty(
							"RespawnRestoreMP", "70")) / 100;
					RESPAWN_RANDOM_ENABLED = Boolean.parseBoolean(player
							.getProperty("RespawnRandomInTown", "False"));
					RESPAWN_RANDOM_MAX_OFFSET = Integer.parseInt(player
							.getProperty("RespawnRandomMaxOffset", "50"));
					MAX_PVTSTORE_SLOTS_DWARF = Integer.parseInt(player
							.getProperty("MaxPvtStoreSlotsDwarf", "5"));
					MAX_PVTSTORE_SLOTS_OTHER = Integer.parseInt(player
							.getProperty("MaxPvtStoreSlotsOther", "4"));
					DELETE_DAYS = Integer.parseInt(player.getProperty(
							"DeleteCharAfterDays", "7"));
					FORCE_INVENTORY_UPDATE = Boolean.parseBoolean(player
							.getProperty("ForceInventoryUpdate", "False"));
					
					ENCHANT_CHANCE_WEAPON = Integer.parseInt(player.getProperty("EnchantChanceWeapon", "68"));
					ENCHANT_CHANCE_ARMOR = Integer.parseInt(player.getProperty("playerChanceArmor", "52"));
					ENCHANT_CHANCE_JEWELRY = Integer.parseInt(player.getProperty("EnchantChanceJewelry", "54"));
					ENCHANT_CHANCE_WEAPON_CRYSTAL = Integer.parseInt(player.getProperty("EnchantChanceWeaponCrystal", "85"));
					ENCHANT_CHANCE_ARMOR_CRYSTAL = Integer.parseInt(player.getProperty("EnchantChanceArmorCrystal", "85"));
					ENCHANT_CHANCE_JEWELRY_CRYSTAL = Integer.parseInt(player.getProperty("EnchantChanceJewelryCrystal", "85"));
					ENCHANT_CHANCE_WEAPON_BLESSED = Integer.parseInt(player.getProperty("EnchantChanceWeaponBlessed", "55"));
					ENCHANT_CHANCE_ARMOR_BLESSED = Integer.parseInt(player.getProperty("EnchantChanceArmorBlessed", "55"));
					ENCHANT_CHANCE_JEWELRY_BLESSED = Integer.parseInt(player.getProperty("EnchantChanceJewelryBlessed", "55"));
					ENCHANT_FAILED_LVL = Integer.parseInt(player.getProperty("EnchantFailedLvl", "0"));
					ENCHANT_MAX_WEAPON = Integer.parseInt(player.getProperty("EnchantMaxWeapon", "25"));
					ENCHANT_MAX_ARMOR = Integer.parseInt(player.getProperty("EnchantMaxArmor", "25"));
					ENCHANT_MAX_JEWELRY = Integer.parseInt(player.getProperty("EnchantMaxJewelry", "25"));
					ENCHANT_SAFE_MAX = Integer.parseInt(player.getProperty("EnchantSafeMax", "3"));
					ENCHANT_SAFE_MAX_FULL = Integer.parseInt(player.getProperty("EnchantSafeMaxFull", "4"));
					GM_OVER_ENCHANT = Integer.parseInt(player.getProperty("GMOverEnchant", "25"));
					ENCHANT_MAX_ALLOWED_WEAPON = Integer.parseInt(player.getProperty("EnchantMaxAllowedWeapon", "25"));
					ENCHANT_MAX_ALLOWED_ARMOR = Integer.parseInt(player.getProperty("EnchantMaxAllowedArmor", "25"));
					ENCHANT_MAX_ALLOWED_JEWELRY = Integer.parseInt(player.getProperty("EnchantMaxAllowedJewelry", "25"));
					MAX_ITEM_ENCHANT_KICK = Integer.parseInt(player.getProperty("EnchantKick", "26"));
					ENCHANT_STACKABLE = Boolean.parseBoolean(player.getProperty("EnchantStackable", "False"));

					BUFF_INVUL_ID = Integer.parseInt(player.getProperty("BuffInvulId", "9999"));
					
					CHECK_SKILLS_ON_ENTER = Boolean.parseBoolean(player.getProperty("CheckSkillsOnEnter", "False"));
					ALLOWED_SKILLS = player.getProperty("AllowedSkills","541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,617,618,619");
					ALLOWED_SKILLS_LIST = new FastList<Integer>();
					for (String id : ALLOWED_SKILLS.trim().split(",")) ALLOWED_SKILLS_LIST.add(Integer.parseInt(id.trim()));
					EFFECT_CANCELING = Boolean.parseBoolean(player.getProperty("CancelLesserEffect", "True"));
					STORE_SKILL_COOLTIME = Boolean.parseBoolean(player.getProperty("StoreSkillCooltime", "True"));
					AUTO_LEARN_DIVINE_INSPIRATION = Boolean.parseBoolean(player.getProperty("AutoLearnDivineInspiration", "False"));
					BUFFS_MAX_AMOUNT = Byte.parseByte(player.getProperty("MaxBuffAmount", "20"));

					NEW_CHAR_SPAWN = Boolean.parseBoolean(player.getProperty("CustomSpawnNewPlayer","False"));
					SPAWN_X = Integer.parseInt(player.getProperty("SpawnX", "0"));
					SPAWN_Y = Integer.parseInt(player.getProperty("SpawnY", "0"));
					SPAWN_Z = Integer.parseInt(player.getProperty("SpawnZ", "0"));
					
					STARTING_LEVEL = Byte.parseByte(player.getProperty(
							"CharacterStartingLevel", "1"));
					ALT_PETS_PHYSICAL_DAMAGE_MULTI = Float.parseFloat(player
							.getProperty("AltPDamagePets", "1.00"));
					ALT_PETS_MAGICAL_DAMAGE_MULTI = Float.parseFloat(player
							.getProperty("AltMDamagePets", "1.00"));
					ALT_NPC_PHYSICAL_DAMAGE_MULTI = Float.parseFloat(player
							.getProperty("AltPDamageNpc", "1.00"));
					ALT_NPC_MAGICAL_DAMAGE_MULTI = Float.parseFloat(player
							.getProperty("AltMDamageNpc", "1.00"));
					MAX_RUN_SPEED = Integer.parseInt(player.getProperty(
							"MaxRunSpeed", "250"));
					MAX_EVASION = Integer.parseInt(player.getProperty(
							"MaxEvasion", "200"));
					MAX_MCRIT_RATE = Integer.parseInt(player.getProperty(
							"MaxMCritRate", "150"));
					MAX_RCRIT = Integer.parseInt(player.getProperty(
							"MaxCritical", "500"));
					MAX_PATK_SPEED = Integer.parseInt(player.getProperty(
							"MaxPAtkSpeed", "1800"));
					MAX_MATK_SPEED = Integer.parseInt(player.getProperty(
							"MaxMAtkSpeed", "2500"));
					DAGGER_RECUDE_DMG_VS_ROBE = Float.parseFloat(player
							.getProperty("DaggerReduceDmgVSRobe", "1.00"));
					DAGGER_RECUDE_DMG_VS_LIGHT = Float.parseFloat(player
							.getProperty("DaggerReduceDmgVSLight", "1.00"));
					DAGGER_RECUDE_DMG_VS_HEAVY = Float.parseFloat(player
							.getProperty("DaggerReduceDmgVSHeavy", "1.00"));
					FRONT_BLOW_SUCCESS = Integer.parseInt(player.getProperty(
							"FrontBlow", "50"));
					BACK_BLOW_SUCCESS = Integer.parseInt(player.getProperty(
							"BackBlow", "70"));
					SIDE_BLOW_SUCCESS = Integer.parseInt(player.getProperty(
							"SideBlow", "60"));
					CUSTOM_RUN_SPEED = Integer.parseInt(player.getProperty(
							"CustomRunSpeed", "0"));
					MULTIPLE_MCRIT = Double.parseDouble(player.getProperty(
							"MultipleMCrit", "4.0"));
					DISABLE_GRADE_PENALTIES = Boolean.parseBoolean(player
							.getProperty("DisableGradePenalties", "False"));
					DISABLE_WEIGHT_PENALTIES = Boolean.parseBoolean(player
							.getProperty("DisableWeightPenalties", "False"));
					DEATH_PENALTY_CHANCE = Integer.parseInt(player.getProperty(
							"DeathPenaltyChance", "20"));
					CUSTOM_STARTER_ITEMS_ENABLED = Boolean.parseBoolean(player
							.getProperty("CustomStarterItemsEnabled", "False"));
					DISABLE_OFFICIAL_STARTER_ITEMS = Boolean
							.parseBoolean(player.getProperty(
									"DisableOfficialStarterItems", "False"));
					if (Config.CUSTOM_STARTER_ITEMS_ENABLED) {
						String[] propertySplit = player.getProperty(
								"CustomStarterItems", "0,0").split(";");
						for (String starteritems : propertySplit) {
							String[] starteritemsSplit = starteritems
									.split(",");
							if (starteritemsSplit.length != 2) {
								CUSTOM_STARTER_ITEMS_ENABLED = false;
								System.out
										.println("StarterItems[Config.load()]: invalid config property -> starter items \""
												+ starteritems + "\"");
							} else
								try {
									CUSTOM_STARTER_ITEMS
											.add(new int[] {
													Integer.parseInt(starteritemsSplit[0]),
													Integer.parseInt(starteritemsSplit[1]) });
								} catch (NumberFormatException nfe) {
									if (!starteritems.equals("")) {
										CUSTOM_STARTER_ITEMS_ENABLED = false;
										System.out
												.println("StarterItems[Config.load()]: invalid config property -> starter items \""
														+ starteritems + "\"");
									}
								}
						}
					}
					ENABLE_MODIFY_SKILL_DURATION = Boolean.parseBoolean(player.getProperty("EnableModifySkillDuration", "False"));
					if (ENABLE_MODIFY_SKILL_DURATION)
					{
						SKILL_DURATION_LIST = new FastMap<Integer, Integer>();
						String[] propertySplit; propertySplit = player.getProperty("SkillDurationList","").split(";");
						for (String skill : propertySplit) 
						{
							String[] skillSplit = skill.split(",");
							if (skillSplit.length != 2)
								System.out.println("[SkillDurationList]: invalid config property -> SkillDurationList \"" + skill + "\"");
							else
								try
							{
									SKILL_DURATION_LIST.put(Integer.parseInt(skillSplit[0]),Integer.parseInt(skillSplit[1]));
							} 
							catch (NumberFormatException nfe)
							{
								if (!skill.equals("")) System.out.println("[SkillDurationList]: invalid config property -> SkillList \"" + skillSplit[0] + "\"" + skillSplit[1]);
							}
						}
					}
					
				}
				catch (Exception e) 
				{
					e.printStackTrace();
					throw new Error("Failed to Load " + PLAYERS_CONFIG_FILE + " File.");
				}
				try 
				{
					Properties clans = new Properties();
					is = new FileInputStream(new File(CLANS_CONFIG_FILE));
					clans.load(is);

					ANNOUNCE_CASTLE_LORDS = Boolean.parseBoolean(clans
							.getProperty("AnnounceCastleLords", "False"));
					LIFE_CRYSTAL_NEEDED = Boolean.parseBoolean(clans
							.getProperty("LifeCrystalNeeded", "True"));
					REMOVE_CASTLE_CIRCLETS = Boolean.parseBoolean(clans
							.getProperty("RemoveCastleCirclets", "True"));
					PLAYER_FAKEDEATH_UP_PROTECTION = Integer.parseInt(clans
							.getProperty("PlayerFakeDeathUpProtection", "0"));
					DEVASTATED_CASTLE_ENABLED = Boolean.parseBoolean(clans
							.getProperty("DevastatedCastleEnabled", "False"));
					FORTRESS_OF_THE_DEAD_ENABLED = Boolean.parseBoolean(clans
							.getProperty("FortressofTheDeadEnabled", "False"));
					FS_TELE_FEE_RATIO = Long.parseLong(clans.getProperty(
							"FortressTeleportFunctionFeeRatio", "604800000"));
					FS_TELE1_FEE = Integer.parseInt(clans.getProperty(
							"FortressTeleportFunctionFeeLvl1", "1000"));
					FS_TELE2_FEE = Integer.parseInt(clans.getProperty(
							"FortressTeleportFunctionFeeLvl2", "10000"));
					FS_SUPPORT_FEE_RATIO = Long.parseLong(clans.getProperty(
							"FortressSupportFunctionFeeRatio", "86400000"));
					FS_SUPPORT1_FEE = Integer.parseInt(clans.getProperty(
							"FortressSupportFeeLvl1", "7000"));
					FS_SUPPORT2_FEE = Integer.parseInt(clans.getProperty(
							"FortressSupportFeeLvl2", "17000"));
					FS_MPREG_FEE_RATIO = Long.parseLong(clans.getProperty(
							"FortressMpRegenerationFunctionFeeRatio",
							"86400000"));
					FS_MPREG1_FEE = Integer.parseInt(clans.getProperty(
							"FortressMpRegenerationFeeLvl1", "6500"));
					FS_MPREG2_FEE = Integer.parseInt(clans.getProperty(
							"FortressMpRegenerationFeeLvl2", "9300"));
					FS_HPREG_FEE_RATIO = Long.parseLong(clans.getProperty(
							"FortressHpRegenerationFunctionFeeRatio",
							"86400000"));
					FS_HPREG1_FEE = Integer.parseInt(clans.getProperty(
							"FortressHpRegenerationFeeLvl1", "2000"));
					FS_HPREG2_FEE = Integer.parseInt(clans.getProperty(
							"FortressHpRegenerationFeeLvl2", "3500"));
					FS_EXPREG_FEE_RATIO = Long.parseLong(clans.getProperty(
							"FortressExpRegenerationFunctionFeeRatio",
							"86400000"));
					FS_EXPREG1_FEE = Integer.parseInt(clans.getProperty(
							"FortressExpRegenerationFeeLvl1", "9000"));
					FS_EXPREG2_FEE = Integer.parseInt(clans.getProperty(
							"FortressExpRegenerationFeeLvl2", "10000"));
					CH_TELE_FEE_RATIO = Long.parseLong(clans.getProperty(
							"ClanHallTeleportFunctionFeeRation", "86400000"));
					CH_TELE1_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallTeleportFunctionFeeLvl1", "86400000"));
					CH_TELE2_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallTeleportFunctionFeeLvl2", "86400000"));
					CH_SUPPORT_FEE_RATIO = Long.parseLong(clans.getProperty(
							"ClanHallSupportFunctionFeeRation", "86400000"));
					CH_SUPPORT1_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallSupportFeeLvl1", "86400000"));
					CH_SUPPORT2_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallSupportFeeLvl2", "86400000"));
					CH_SUPPORT3_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallSupportFeeLvl3", "86400000"));
					CH_SUPPORT4_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallSupportFeeLvl4", "86400000"));
					CH_SUPPORT5_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallSupportFeeLvl5", "86400000"));
					CH_SUPPORT6_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallSupportFeeLvl6", "86400000"));
					CH_SUPPORT7_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallSupportFeeLvl7", "86400000"));
					CH_SUPPORT8_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallSupportFeeLvl8", "86400000"));
					CH_MPREG_FEE_RATIO = Long.parseLong(clans.getProperty(
							"ClanHallMpRegenerationFunctionFeeRation",
							"86400000"));
					CH_MPREG1_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallMpRegenerationFeeLvl1", "86400000"));
					CH_MPREG2_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallMpRegenerationFeeLvl2", "86400000"));
					CH_MPREG3_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallMpRegenerationFeeLvl3", "86400000"));
					CH_MPREG4_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallMpRegenerationFeeLvl4", "86400000"));
					CH_MPREG5_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallMpRegenerationFeeLvl5", "86400000"));
					CH_HPREG_FEE_RATIO = Long.parseLong(clans.getProperty(
							"ClanHallHpRegenerationFunctionFeeRation",
							"86400000"));
					CH_HPREG1_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallHpRegenerationFeeLvl1", "86400000"));
					CH_HPREG2_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallHpRegenerationFeeLvl2", "86400000"));
					CH_HPREG3_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallHpRegenerationFeeLvl3", "86400000"));
					CH_HPREG4_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallHpRegenerationFeeLvl4", "86400000"));
					CH_HPREG5_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallHpRegenerationFeeLvl5", "86400000"));
					CH_HPREG6_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallHpRegenerationFeeLvl6", "86400000"));
					CH_HPREG7_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallHpRegenerationFeeLvl7", "86400000"));
					CH_HPREG8_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallHpRegenerationFeeLvl8", "86400000"));
					CH_HPREG9_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallHpRegenerationFeeLvl9", "86400000"));
					CH_HPREG10_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallHpRegenerationFeeLvl10", "86400000"));
					CH_HPREG11_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallHpRegenerationFeeLvl11", "86400000"));
					CH_HPREG12_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallHpRegenerationFeeLvl12", "86400000"));
					CH_HPREG13_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallHpRegenerationFeeLvl13", "86400000"));
					CH_EXPREG_FEE_RATIO = Long.parseLong(clans.getProperty(
							"ClanHallExpRegenerationFunctionFeeRation",
							"86400000"));
					CH_EXPREG1_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallExpRegenerationFeeLvl1", "86400000"));
					CH_EXPREG2_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallExpRegenerationFeeLvl2", "86400000"));
					CH_EXPREG3_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallExpRegenerationFeeLvl3", "86400000"));
					CH_EXPREG4_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallExpRegenerationFeeLvl4", "86400000"));
					CH_EXPREG5_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallExpRegenerationFeeLvl5", "86400000"));
					CH_EXPREG6_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallExpRegenerationFeeLvl6", "86400000"));
					CH_EXPREG7_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallExpRegenerationFeeLvl7", "86400000"));
					CH_ITEM_FEE_RATIO = Long.parseLong(clans
							.getProperty(
									"ClanHallItemCreationFunctionFeeRation",
									"86400000"));
					CH_ITEM1_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallItemCreationFunctionFeeLvl1", "86400000"));
					CH_ITEM2_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallItemCreationFunctionFeeLvl2", "86400000"));
					CH_ITEM3_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallItemCreationFunctionFeeLvl3", "86400000"));
					CH_CURTAIN_FEE_RATIO = Long.parseLong(clans.getProperty(
							"ClanHallCurtainFunctionFeeRation", "86400000"));
					CH_CURTAIN1_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallCurtainFunctionFeeLvl1", "86400000"));
					CH_CURTAIN2_FEE = Integer.parseInt(clans.getProperty(
							"ClanHallCurtainFunctionFeeLvl2", "86400000"));
					CH_FRONT_FEE_RATIO = Long.parseLong(clans.getProperty(
							"ClanHallFrontPlatformFunctionFeeRation",
							"86400000"));
					CH_FRONT1_FEE = Integer
							.parseInt(clans.getProperty(
									"ClanHallFrontPlatformFunctionFeeLvl1",
									"86400000"));
					CH_FRONT2_FEE = Integer
							.parseInt(clans.getProperty(
									"ClanHallFrontPlatformFunctionFeeLvl2",
									"86400000"));
					ALT_CLAN_JOIN_DAYS = Integer.parseInt(clans.getProperty(
							"DaysBeforeJoinAClan", "5"));
					ALT_CLAN_CREATE_DAYS = Integer.parseInt(clans.getProperty(
							"DaysBeforeCreateAClan", "10"));
					ALT_CLAN_DISSOLVE_DAYS = Integer.parseInt(clans
							.getProperty("DaysToPassToDissolveAClan", "7"));
					ALT_ALLY_JOIN_DAYS_WHEN_LEAVED = Integer.parseInt(clans
							.getProperty("DaysBeforeJoinAllyWhenLeaved", "1"));
					ALT_ALLY_JOIN_DAYS_WHEN_DISMISSED = Integer
							.parseInt(clans.getProperty(
									"DaysBeforeJoinAllyWhenDismissed", "1"));
					ALT_ACCEPT_CLAN_DAYS_WHEN_DISMISSED = Integer
							.parseInt(clans
									.getProperty(
											"DaysBeforeAcceptNewClanWhenDismissed",
											"1"));
					ALT_CREATE_ALLY_DAYS_WHEN_DISSOLVED = Integer
							.parseInt(clans.getProperty(
									"DaysBeforeCreateNewAllyWhenDissolved",
									"10"));
					ALT_MAX_NUM_OF_CLANS_IN_ALLY = Integer.parseInt(clans
							.getProperty("AltMaxNumOfClansInAlly", "3"));
					ALT_CLAN_MEMBERS_FOR_WAR = Integer.parseInt(clans
							.getProperty("AltClanMembersForWar", "15"));
					ALT_GAME_NEW_CHAR_ALWAYS_IS_NEWBIE = Boolean
							.parseBoolean(clans.getProperty(
									"AltNewCharAlwaysIsNewbie", "False"));
					ALT_MEMBERS_CAN_WITHDRAW_FROM_CLANWH = Boolean
							.parseBoolean(clans.getProperty(
									"AltMembersCanWithdrawFromClanWH", "False"));
					CLAN_RAISE_FIRST_COST = Integer.parseInt(clans.getProperty(
							"ClanFirstCost", "650000"));
					CLAN_RAISE_SEC_COST = Integer.parseInt(clans.getProperty(
							"ClanSecondCOst", "2500000"));
					CLAN_MEMBERS_FIRST = Integer.parseInt(clans.getProperty(
							"ClanMembersNeedSix", "30"));
					CLAN_MEMBERS_SEC = Integer.parseInt(clans.getProperty(
							"ClanMembersNeedSeven", "80"));
					CLAN_MEMBERS_THIRD = Integer.parseInt(clans.getProperty(
							"ClanMembersNeedEight", "120"));
					CLAN_REPUTATION_FIRST = Integer.parseInt(clans.getProperty(
							"ClanReputationSix", "10000"));
					CLAN_REPUTATION_SEC = Integer.parseInt(clans.getProperty(
							"ClanReputationSeven", "20000"));
					CLAN_REPUTATION_THIRD = Integer.parseInt(clans.getProperty(
							"ClanReputationEight", "40000"));
					CLAN_SP_FIRST = Integer.parseInt(clans.getProperty(
							"ClanSpFirst", "30000"));
					CLAN_SP_SEC = Integer.parseInt(clans.getProperty(
							"ClanSpSecond", "150000"));
					CLAN_SP_THIRD = Integer.parseInt(clans.getProperty(
							"ClanSpThird", "500000"));
					CLAN_SP_FORTH = Integer.parseInt(clans.getProperty(
							"ClanSpForth", "1400000"));
					CLAN_SP_FIFTH = Integer.parseInt(clans.getProperty(
							"ClanSpFifth", "3500000"));
					CLAN_LEADER_COLOR_ENABLED = Boolean
							.parseBoolean(clans.getProperty(
									"ClanLeaderNameColorEnabled", "False"));
					CLAN_LEADER_COLOR = Integer.decode("0x"
							+ clans.getProperty("ClanLeaderColor", "00BFFF"));
					CLAN_LEADER_COLOR_CLAN_LEVEL = Integer.parseInt(clans
							.getProperty("ClanLeaderColorAtClanLevel", "1"));
					CLAN_LEADER_TITLE_ENABLED = Boolean
							.parseBoolean(clans.getProperty(
									"ClanLeaderTitleColorEnabled", "False"));
					CLAN_LEADER_TITLE = Integer.decode("0x"
							+ clans.getProperty("ClanLeaderTitle", "00BFFF"));
					CLAN_LEADER_TITLE_CLAN_LEVEL = Integer.parseInt(clans
							.getProperty("ClanLeaderTitleAtClanLevel", "1"));
				} catch (Exception e) {
					e.printStackTrace();
					throw new Error("Failed to Load " + CLANS_CONFIG_FILE
							+ " File.");
				}

				try 
				{
					Properties npc = new Properties();
					is = new FileInputStream(new File(NPC_CONFIG_FILE));
					npc.load(is);

					SERVICES_MANAGER = Boolean.parseBoolean(npc.getProperty("ServicesManager", "false"));
					Service_Npc_Manager_Id = Integer.parseInt(npc.getProperty("ServicesManagerNpcId", "12"));
					SERVICE_AUDIT = Boolean.parseBoolean(npc.getProperty("ServiceAudit", "true"));

					Service_Npc_AutoSpawn = Boolean.parseBoolean(npc.getProperty("AutoSpawnServiceNPC", "false"));
					Service_Spawn_X = Integer.parseInt(npc.getProperty("AutoSpawnCoord_X", "0"));
					Service_Spawn_Y = Integer.parseInt(npc.getProperty("AutoSpawnCoord_Y", "0"));
					Service_Spawn_Z = Integer.parseInt(npc.getProperty("AutoSpawnCoord_Z", "0"));
					
					USE_PREMIUMSERVICE = Boolean.parseBoolean(npc.getProperty("UsePremiumServices", "False"));
					Service_Premium1_Item_Id = Integer.parseInt(npc.getProperty("ServicePremium1PriceID", "4037"));
					Service_Premium1_Item_Count = Integer.parseInt(npc.getProperty("ServicePremium1PriceCount", "1"));
					PREMIUM_RATE_XP = Float.parseFloat(npc.getProperty("PremiumRateXp", "2"));
					PREMIUM_RATE_SP = Float.parseFloat(npc.getProperty("PremiumRateSp", "2"));
					PREMIUM_RATE_DROP_SPOIL = Float.parseFloat(npc.getProperty("PremiumRateDropSpoil", "2"));
					PREMIUM_RATE_DROP_ITEMS = Float.parseFloat(npc.getProperty("PremiumRateDropItems", "2"));
					PREMIUM_RATE_DROP_QUEST = Float.parseFloat(npc.getProperty("PremiumRateDropQuest", "2"));
					PREMIUM_RATE_DROP_ITEMS_BY_RAID = Float.parseFloat(npc.getProperty("PremiumRateRaidDropItems", "2"));
					PREMIUM_RATE_DROP_ADENA = Float.parseFloat(npc.getProperty("PremiumRateDropAdena", "2"));
					
					Service_ClanLvl6 = Boolean.parseBoolean(npc.getProperty("ServiceClanLvl6", "false"));
					Service_CL6_Item_Id = Integer.parseInt(npc.getProperty(
							"ServiceClanLvl6PriceID", "4037"));
					Service_CL6_Item_Count = Integer.parseInt(npc.getProperty(
							"ServiceClanLvl6PriceCount", "1"));

					Service_ClanLvl7 = Boolean.parseBoolean(npc.getProperty(
							"ServiceClanLvl7", "false"));
					Service_CL7_Item_Id = Integer.parseInt(npc.getProperty(
							"ServiceClanLvl7PriceID", "4037"));
					Service_CL7_Item_Count = Integer.parseInt(npc.getProperty(
							"ServiceClanLvl7PriceCount", "1"));

					Service_ClanLvl8 = Boolean.parseBoolean(npc.getProperty(
							"ServiceClanLvl8", "false"));
					Service_CL8_Item_Id = Integer.parseInt(npc.getProperty(
							"ServiceClanLvl8PriceID", "4037"));
					Service_CL8_Item_Count = Integer.parseInt(npc.getProperty(
							"ServiceClanLvl8PriceCount", "1"));

					Service_ClanRep = Boolean.parseBoolean(npc.getProperty(
							"ServiceClanRep", "false"));
					Service_ClanRep_PriceID = Integer.parseInt(npc.getProperty(
							"ServiceClanRepPriceID", "4037"));
					Service_ClanRep_PriceCount = Integer.parseInt(npc
							.getProperty("ServiceClanRepPriceCount", "1"));
					Service_ClanRep_Count = Integer.parseInt(npc.getProperty(
							"ServiceClanRepCount", "1"));

					Service_Noble = Boolean.parseBoolean(npc.getProperty(
							"ServiceNoble", "false"));
					Service_Noble_PriceID = Integer.parseInt(npc.getProperty(
							"ServiceNoblePriceID", "4037"));
					Service_Noble_PriceCount = Integer.parseInt(npc
							.getProperty("ServiceNoblePriceCount", "1"));

					Service_ChangeNick = Boolean.parseBoolean(npc.getProperty(
							"ServiceChangeNick", "false"));
					Service_ChangeNick_PriceID = Integer.parseInt(npc
							.getProperty("ServiceChangeNickPriceID", "4037"));
					Service_ChangeNick_PriceCount = Integer.parseInt(npc
							.getProperty("ServiceChangeNickPriceCount", "1"));

					Service_SetSex = Boolean.parseBoolean(npc.getProperty(
							"ServiceSetSex", "false"));
					Service_SetSex_PriceID = Integer.parseInt(npc.getProperty(
							"ServiceSetSexPriceID", "4037"));
					Service_SetSex_PriceCount = Integer.parseInt(npc
							.getProperty("ServiceSetSexPriceCount", "1"));

					Service_Nick_Color = Boolean.parseBoolean(npc.getProperty(
							"ServiceNickColor", "False"));
					Service_Nick_Color_Time = Integer.parseInt(npc.getProperty(
							"ServiceNickColorTime", "7"));
					Service_Nick_Color_PriceID = Integer.parseInt(npc
							.getProperty("ServiceNickColorPriceID", "4037"));
					Service_Nick_Color_Count = Integer.parseInt(npc
							.getProperty("ServiceNickColorCount", "1"));
					Service_Nick_Color_List = npc.getProperty(
							"ServiceNickColorList", "00FF00").split(";");

					SHOW_NPC_CREST = Boolean.parseBoolean(npc.getProperty(
							"ShowNpcCrest", "False"));
					SET_AGRO_COLOR_TITLE = Boolean.parseBoolean(npc
							.getProperty("AgroMobsColorTitle", "False"));

					CHAMPION_ENABLE = Boolean.parseBoolean(npc.getProperty(
							"ChampionEnable", "false"));
					CHAMPION_RED_TITLE = npc.getProperty("ChampionRedTitle",
							"High Champ");
					CHAMPION_BLUE_TITLE = npc.getProperty("ChampionBlueTitle",
							"Low Champ");
					CHAMPION_FREQUENCY_RED = Integer.parseInt(npc.getProperty(
							"RedChampionFrequency", "0"));
					CHAMP_MIN_LVL_RED = Integer.parseInt(npc.getProperty(
							"RedChampionMinLevel", "20"));
					CHAMP_MAX_LVL_RED = Integer.parseInt(npc.getProperty(
							"RedChampionMaxLevel", "60"));
					CHAMPION_HP_RED = Integer.parseInt(npc.getProperty(
							"RedChampionHp", "7"));
					CHAMPION_HP_REGEN_RED = Float.parseFloat(npc.getProperty(
							"RedChampionHpRegen", "1"));
					CHAMPION_REWARDS_RED = Integer.parseInt(npc.getProperty(
							"RedChampionRewards", "8"));
					CHAMPION_ADENAS_REWARDS_RED = Integer.parseInt(npc
							.getProperty("RedChampionAdenasRewards", "1"));
					CHAMPION_ATK_RED = Float.parseFloat(npc.getProperty(
							"RedChampionAtk", "1."));
					CHAMPION_DEF_RED = Float.parseFloat(npc.getProperty(
							"RedChampionDef", "1."));
					CHAMPION_SPD_ATK_RED = Float.parseFloat(npc.getProperty(
							"RedChampionSpdAtk", "1."));
					CHAMPION_REWARD_RED = Integer.parseInt(npc.getProperty(
							"RedChampionRewardItem", "0"));
					CHAMPION_REWARD_ID_RED = Integer.parseInt(npc.getProperty(
							"RedChampionRewardItemID", "6393"));
					CHAMPION_REWARD_QTY_RED = Integer.parseInt(npc.getProperty(
							"RedChampionRewardItemQty", "1"));
					CHAMPION_FREQUENCY_BLUE = Integer.parseInt(npc.getProperty(
							"BlueChampionFrequency", "0"));
					CHAMP_MIN_LVL_BLUE = Integer.parseInt(npc.getProperty(
							"BlueChampionMinLevel", "20"));
					CHAMP_MAX_LVL_BLUE = Integer.parseInt(npc.getProperty(
							"BlueChampionMaxLevel", "60"));
					CHAMPION_HP_BLUE = Integer.parseInt(npc.getProperty(
							"BlueChampionHp", "7"));
					CHAMPION_HP_REGEN_BLUE = Float.parseFloat(npc.getProperty(
							"BlueChampionHpRegen", "1."));
					CHAMPION_REWARDS_BLUE = Integer.parseInt(npc.getProperty(
							"BlueChampionRewards", "8"));
					CHAMPION_ADENAS_REWARDS_BLUE = Integer.parseInt(npc
							.getProperty("BlueChampionAdenasRewards", "1"));
					CHAMPION_ATK_BLUE = Float.parseFloat(npc.getProperty(
							"BlueChampionAtk", "1."));
					CHAMPION_DEF_BLUE = Float.parseFloat(npc.getProperty(
							"BlueChampionDef", "1."));
					CHAMPION_SPD_ATK_BLUE = Float.parseFloat(npc.getProperty(
							"BlueChampionSpdAtk", "1."));
					CHAMPION_REWARD_BLUE = Integer.parseInt(npc.getProperty(
							"BlueChampionRewardItem", "0"));
					CHAMPION_REWARD_ID_BLUE = Integer.parseInt(npc.getProperty(
							"BlueChampionRewardItemID", "6393"));
					CHAMPION_REWARD_QTY_BLUE = Integer.parseInt(npc
							.getProperty("BlueChampionRewardItemQty", "1"));

					ALLOW_CLASS_MASTERS = Boolean.parseBoolean(npc.getProperty(
							"AllowClassMasters", "False"));
					ALLOW_REMOTE_CLASS_MASTERS = Boolean.parseBoolean(npc
							.getProperty("AllowRemoteClassMasters", "False"));
					ALT_GAME_MOB_ATTACK_AI = Boolean.parseBoolean(npc
							.getProperty("AltGameMobAttackAI", "False"));
					GUARD_ATTACK_AGGRO_MOB = Boolean.parseBoolean(npc
							.getProperty("AltMobAgroInPeaceZone", "True"));

					ALLOW_GUARDS = Boolean.parseBoolean(npc.getProperty(
							"AllowGuards", "False"));
					WYVERN_SPEED = Integer.parseInt(npc.getProperty(
							"WyvernSpeed", "100"));
					STRIDER_SPEED = Integer.parseInt(npc.getProperty(
							"StriderSpeed", "80"));
					ALLOW_WYVERN_UPGRADER = Boolean.parseBoolean(npc
							.getProperty("AllowWyvernUpgrader", "False"));
					FLYING_WYVERN_DURING_SIEGE = Boolean.parseBoolean(npc
							.getProperty("FlyingWyvernDuringSiege", "False"));

					FS_TIME_ATTACK = Integer.parseInt(npc.getProperty(
							"TimeOfAttack", "50"));
					FS_TIME_COOLDOWN = Integer.parseInt(npc.getProperty(
							"TimeOfCoolDown", "5"));
					FS_TIME_ENTRY = Integer.parseInt(npc.getProperty(
							"TimeOfEntry", "3"));
					FS_TIME_WARMUP = Integer.parseInt(npc.getProperty(
							"TimeOfWarmUp", "2"));
					FS_PARTY_MEMBER_COUNT = Integer.parseInt(npc.getProperty(
							"NumberOfNecessaryPartyMembers", "4"));
					if (FS_TIME_ATTACK <= 0)
						FS_TIME_ATTACK = 50;
					if (FS_TIME_COOLDOWN <= 0)
						FS_TIME_COOLDOWN = 5;
					if (FS_TIME_ENTRY <= 0)
						FS_TIME_ENTRY = 3;
					if (FS_TIME_ENTRY <= 0)
						FS_TIME_ENTRY = 3;
					if (FS_TIME_ENTRY <= 0)
						FS_TIME_ENTRY = 3;

					MIN_MONSTER_ANIMATION = Integer.parseInt(npc.getProperty(
							"MinMonsterAnimation", "0"));
					MAX_MONSTER_ANIMATION = Integer.parseInt(npc.getProperty(
							"MaxMonsterAnimation", "0"));
					ANNOUNCE_MAMMON_SPAWN = Boolean.parseBoolean(npc
							.getProperty("AnnounceMammonSpawn", "True"));
					PET_RENT_NPC = npc.getProperty("ListPetRentNpc", "30827");
					LIST_PET_RENT_NPC = new FastList<Integer>();
					for (String id : PET_RENT_NPC.split(","))
						LIST_PET_RENT_NPC.add(Integer.parseInt(id));
					RAID_HP_REGEN_MULTIPLIER = Double.parseDouble(npc
							.getProperty("RaidHpRegenMultiplier", "100")) / 100;
					RAID_MP_REGEN_MULTIPLIER = Double.parseDouble(npc
							.getProperty("RaidMpRegenMultiplier", "100")) / 100;
					RAID_DEFENCE_MULTIPLIER = Double.parseDouble(npc
							.getProperty("RaidDefenceMultiplier", "100")) / 100;
					RAID_MINION_RESPAWN_TIMER = Integer.parseInt(npc
							.getProperty("RaidMinionRespawnTime", "300000"));
					RAID_MIN_RESPAWN_MULTIPLIER = Float.parseFloat(npc
							.getProperty("RaidMinRespawnMultiplier", "1.0"));
					RAID_MAX_RESPAWN_MULTIPLIER = Float.parseFloat(npc
							.getProperty("RaidMaxRespawnMultiplier", "1.0"));
					MIN_NPC_ANIMATION = Integer.parseInt(npc.getProperty(
							"MinNPCAnimation", "10"));
					MAX_NPC_ANIMATION = Integer.parseInt(npc.getProperty(
							"MaxNPCAnimation", "20"));
					NPC_ATTACKABLE = Boolean.parseBoolean(npc.getProperty(
							"NpcAttackable", "False"));
					SHOW_NPC_LVL = Boolean.parseBoolean(npc.getProperty(
							"ShowNpcLevel", "False"));
					INVUL_NPC_LIST = new FastList<Integer>();
					String t = npc
							.getProperty(
									"InvulNpcList",
									"30001-32132,35092-35103,35142-35146,35176-35187,35218-35232,35261-35278,35308-35319,35352-35367,35382-35407,35417-35427,35433-35469,35497-35513,35544-35587,35600-35617,35623-35628,35638-35640,35644,35645,50007,70010,99999");
					String as[];
					int k = (as = t.split(",")).length;
					for (int j = 0; j < k; j++) {
						String t2 = as[j];
						if (t2.contains("-")) {
							int a1 = Integer.parseInt(t2.split("-")[0]);
							int a2 = Integer.parseInt(t2.split("-")[1]);
							for (int i = a1; i <= a2; i++)
								INVUL_NPC_LIST.add(Integer.valueOf(i));
						} else
							INVUL_NPC_LIST.add(Integer.valueOf(Integer
									.parseInt(t2)));
					}
					DISABLE_ATTACK_NPC_TYPE = Boolean.parseBoolean(npc
							.getProperty("DisableAttackToNpcs", "False"));
					ALLOWED_NPC_TYPES = npc.getProperty("AllowedNPCTypes");
					LIST_ALLOWED_NPC_TYPES = new FastList<String>();
					for (String npc_type : ALLOWED_NPC_TYPES.split(","))
						LIST_ALLOWED_NPC_TYPES.add(npc_type);

					Antharas_Wait_Time = Integer.parseInt(npc.getProperty(
							"AntharasWaitTime", "30"));
					if (Antharas_Wait_Time < 3 || Antharas_Wait_Time > 60)
						Antharas_Wait_Time = 30;
					Antharas_Wait_Time = Antharas_Wait_Time * 60000;
					Valakas_Wait_Time = Integer.parseInt(npc.getProperty(
							"ValakasWaitTime", "20"));
					if (Valakas_Wait_Time < 3 || Valakas_Wait_Time > 60)
						Valakas_Wait_Time = 20;
					Valakas_Wait_Time = Valakas_Wait_Time * 60000;
					Interval_Of_Antharas_Spawn = Integer.parseInt(npc
							.getProperty("IntervalOfAntharasSpawn", "192"));
					if (Interval_Of_Antharas_Spawn < 1
							|| Interval_Of_Antharas_Spawn > 480)
						Interval_Of_Antharas_Spawn = 192;
					Interval_Of_Antharas_Spawn = Interval_Of_Antharas_Spawn * 3600000;
					Random_Of_Antharas_Spawn = Integer.parseInt(npc
							.getProperty("RandomOfAntharasSpawn", "145"));
					if (Random_Of_Antharas_Spawn < 1
							|| Random_Of_Antharas_Spawn > 192)
						Random_Of_Antharas_Spawn = 145;
					Random_Of_Antharas_Spawn = Random_Of_Antharas_Spawn * 3600000;
					Interval_Of_Valakas_Spawn = Integer.parseInt(npc
							.getProperty("IntervalOfValakasSpawn", "192"));
					if (Interval_Of_Valakas_Spawn < 1
							|| Interval_Of_Valakas_Spawn > 480)
						Interval_Of_Valakas_Spawn = 192;
					Interval_Of_Valakas_Spawn = Interval_Of_Valakas_Spawn * 3600000;
					Random_Of_Valakas_Spawn = Integer.parseInt(npc.getProperty(
							"RandomOfValakasSpawn", "145"));
					if (Random_Of_Valakas_Spawn < 1
							|| Random_Of_Valakas_Spawn > 192)
						Random_Of_Valakas_Spawn = 145;
					Random_Of_Valakas_Spawn = Random_Of_Valakas_Spawn * 3600000;
					Interval_Of_Baium_Spawn = Integer.parseInt(npc.getProperty(
							"IntervalOfBaiumSpawn", "121"));
					if (Interval_Of_Baium_Spawn < 1
							|| Interval_Of_Baium_Spawn > 480)
						Interval_Of_Baium_Spawn = 121;
					Interval_Of_Baium_Spawn = Interval_Of_Baium_Spawn * 3600000;
					Random_Of_Baium_Spawn = Integer.parseInt(npc.getProperty(
							"RandomOfBaiumSpawn", "8"));
					if (Random_Of_Baium_Spawn < 1
							|| Random_Of_Baium_Spawn > 192)
						Random_Of_Baium_Spawn = 8;
					Random_Of_Baium_Spawn = Random_Of_Baium_Spawn * 3600000;
					Interval_Of_Core_Spawn = Integer.parseInt(npc.getProperty(
							"IntervalOfCoreSpawn", "27"));
					if (Interval_Of_Core_Spawn < 1
							|| Interval_Of_Core_Spawn > 480)
						Interval_Of_Core_Spawn = 27;
					Interval_Of_Core_Spawn = Interval_Of_Core_Spawn * 3600000;
					Random_Of_Core_Spawn = Integer.parseInt(npc.getProperty(
							"RandomOfCoreSpawn", "47"));
					if (Random_Of_Core_Spawn < 1 || Random_Of_Core_Spawn > 192)
						Random_Of_Core_Spawn = 47;
					Random_Of_Core_Spawn = Random_Of_Core_Spawn * 3600000;
					Interval_Of_Orfen_Spawn = Integer.parseInt(npc.getProperty(
							"IntervalOfOrfenSpawn", "28"));
					if (Interval_Of_Orfen_Spawn < 1
							|| Interval_Of_Orfen_Spawn > 480)
						Interval_Of_Orfen_Spawn = 28;
					Interval_Of_Orfen_Spawn = Interval_Of_Orfen_Spawn * 3600000;
					Random_Of_Orfen_Spawn = Integer.parseInt(npc.getProperty(
							"RandomOfOrfenSpawn", "41"));
					if (Random_Of_Orfen_Spawn < 1
							|| Random_Of_Orfen_Spawn > 192)
						Random_Of_Orfen_Spawn = 41;
					Random_Of_Orfen_Spawn = Random_Of_Orfen_Spawn * 3600000;
					Interval_Of_QueenAnt_Spawn = Integer.parseInt(npc
							.getProperty("IntervalOfQueenAntSpawn", "19"));
					if (Interval_Of_QueenAnt_Spawn < 1
							|| Interval_Of_QueenAnt_Spawn > 480)
						Interval_Of_QueenAnt_Spawn = 19;
					Interval_Of_QueenAnt_Spawn = Interval_Of_QueenAnt_Spawn * 3600000;
					Random_Of_QueenAnt_Spawn = Integer.parseInt(npc
							.getProperty("RandomOfQueenAntSpawn", "35"));
					if (Random_Of_QueenAnt_Spawn < 1
							|| Random_Of_QueenAnt_Spawn > 192)
						Random_Of_QueenAnt_Spawn = 35;
					Random_Of_QueenAnt_Spawn = Random_Of_QueenAnt_Spawn * 3600000;
					Interval_Of_Zaken_Spawn = Integer.parseInt(npc.getProperty(
							"IntervalOfZakenSpawn", "19"));
					if (Interval_Of_Zaken_Spawn < 1
							|| Interval_Of_Zaken_Spawn > 480)
						Interval_Of_Zaken_Spawn = 19;
					Interval_Of_Zaken_Spawn = Interval_Of_Zaken_Spawn * 3600000;
					Random_Of_Zaken_Spawn = Integer.parseInt(npc.getProperty(
							"RandomOfZakenSpawn", "35"));
					if (Random_Of_Zaken_Spawn < 1
							|| Random_Of_Zaken_Spawn > 192)
						Random_Of_Zaken_Spawn = 35;
					Random_Of_Zaken_Spawn = Random_Of_Zaken_Spawn * 3600000;
					Interval_Of_Frintezza_Spawn = Integer.parseInt(npc
							.getProperty("IntervalOfFrintezzaSpawn", "121"));
					if (Interval_Of_Frintezza_Spawn < 1
							|| Interval_Of_Frintezza_Spawn > 480)
						Interval_Of_Frintezza_Spawn = 121;
					Interval_Of_Frintezza_Spawn = Interval_Of_Frintezza_Spawn * 3600000;
					Random_Of_Frintezza_Spawn = Integer.parseInt(npc
							.getProperty("RandomOfFrintezzaSpawn", "8"));
					if (Random_Of_Frintezza_Spawn < 1
							|| Random_Of_Frintezza_Spawn > 192)
						Random_Of_Frintezza_Spawn = 8;
					Random_Of_Frintezza_Spawn = Random_Of_Frintezza_Spawn * 3600000;
					HPH_FIXINTERVALOFHALTER = Integer.parseInt(npc.getProperty(
							"FixIntervalOfHalter", "172800"));
					if (HPH_FIXINTERVALOFHALTER < 300
							|| HPH_FIXINTERVALOFHALTER > 864000)
						HPH_FIXINTERVALOFHALTER = 172800;
					HPH_RANDOMINTERVALOFHALTER = Integer.parseInt(npc
							.getProperty("RandomIntervalOfHalter", "86400"));
					if (HPH_RANDOMINTERVALOFHALTER < 300
							|| HPH_RANDOMINTERVALOFHALTER > 864000)
						HPH_RANDOMINTERVALOFHALTER = 86400;
					HPH_APPTIMEOFHALTER = Integer.parseInt(npc.getProperty(
							"AppTimeOfHalter", "20"));
					if (HPH_APPTIMEOFHALTER < 5 || HPH_APPTIMEOFHALTER > 60)
						HPH_APPTIMEOFHALTER = 20;
					HPH_ACTIVITYTIMEOFHALTER = Integer.parseInt(npc
							.getProperty("ActivityTimeOfHalter", "21600"));
					if (HPH_ACTIVITYTIMEOFHALTER < 7200
							|| HPH_ACTIVITYTIMEOFHALTER > 86400)
						HPH_ACTIVITYTIMEOFHALTER = 21600;
					HPH_FIGHTTIMEOFHALTER = Integer.parseInt(npc.getProperty(
							"FightTimeOfHalter", "7200"));
					if (HPH_FIGHTTIMEOFHALTER < 7200
							|| HPH_FIGHTTIMEOFHALTER > 21600)
						HPH_FIGHTTIMEOFHALTER = 7200;
					HPH_CALLROYALGUARDHELPERCOUNT = Integer.parseInt(npc
							.getProperty("CallRoyalGuardHelperCount", "6"));
					if (HPH_CALLROYALGUARDHELPERCOUNT < 1
							|| HPH_CALLROYALGUARDHELPERCOUNT > 6)
						HPH_CALLROYALGUARDHELPERCOUNT = 6;
					HPH_CALLROYALGUARDHELPERINTERVAL = Integer.parseInt(npc
							.getProperty("CallRoyalGuardHelperInterval", "10"));
					if (HPH_CALLROYALGUARDHELPERINTERVAL < 1
							|| HPH_CALLROYALGUARDHELPERINTERVAL > 60)
						HPH_CALLROYALGUARDHELPERINTERVAL = 10;
					HPH_INTERVALOFDOOROFALTER = Integer.parseInt(npc
							.getProperty("IntervalOfDoorOfAlter", "5400"));
					if (HPH_INTERVALOFDOOROFALTER < 60
							|| HPH_INTERVALOFDOOROFALTER > 5400)
						HPH_INTERVALOFDOOROFALTER = 5400;
					HPH_TIMEOFLOCKUPDOOROFALTAR = Integer.parseInt(npc
							.getProperty("TimeOfLockUpDoorOfAltar", "180"));
					if (HPH_TIMEOFLOCKUPDOOROFALTAR < 60
							|| HPH_TIMEOFLOCKUPDOOROFALTAR > 600)
						HPH_TIMEOFLOCKUPDOOROFALTAR = 180;
					FWS_ENABLESINGLEPLAYER = Boolean.parseBoolean(npc
							.getProperty("EnableSinglePlayer", "False"));
					FWS_FIXINTERVALOFSAILRENSPAWN = Integer.parseInt(npc
							.getProperty("FixIntervalOfSailrenSpawn", "1440"));
					if (FWS_FIXINTERVALOFSAILRENSPAWN < 5
							|| FWS_FIXINTERVALOFSAILRENSPAWN > 2880)
						FWS_FIXINTERVALOFSAILRENSPAWN = 1440;
					FWS_FIXINTERVALOFSAILRENSPAWN = FWS_FIXINTERVALOFSAILRENSPAWN * 60000;
					FWS_RANDOMINTERVALOFSAILRENSPAWN = Integer
							.parseInt(npc.getProperty(
									"RandomIntervalOfSailrenSpawn", "1440"));
					if (FWS_RANDOMINTERVALOFSAILRENSPAWN < 5
							|| FWS_RANDOMINTERVALOFSAILRENSPAWN > 2880)
						FWS_RANDOMINTERVALOFSAILRENSPAWN = 1440;
					FWS_RANDOMINTERVALOFSAILRENSPAWN = FWS_RANDOMINTERVALOFSAILRENSPAWN * 60000;
					FWS_INTERVALOFNEXTMONSTER = Integer.parseInt(npc
							.getProperty("IntervalOfNextMonster", "1"));
					if (FWS_INTERVALOFNEXTMONSTER < 1
							|| FWS_INTERVALOFNEXTMONSTER > 10)
						FWS_INTERVALOFNEXTMONSTER = 1;
					FWS_INTERVALOFNEXTMONSTER = FWS_INTERVALOFNEXTMONSTER * 60000;
					FWS_ACTIVITYTIMEOFMOBS = Integer.parseInt(npc.getProperty(
							"ActivityTimeOfMobs", "120"));
					if (FWS_ACTIVITYTIMEOFMOBS < 1
							|| FWS_ACTIVITYTIMEOFMOBS > 120)
						FWS_ACTIVITYTIMEOFMOBS = 120;
					FWS_ACTIVITYTIMEOFMOBS = FWS_ACTIVITYTIMEOFMOBS * 60000;
				} catch (Exception e) {
					e.printStackTrace();
					throw new Error("Failed to Load " + NPC_CONFIG_FILE
							+ " File.");
				}

				try {
					Properties Dev = new Properties();
					is = new FileInputStream(new File(DEV_CONFIG_FILE));
					Dev.load(is);

					SK_FIG = Float.parseFloat(Dev.getProperty("Skfig", "1.0"));
					SK_MAG = Float.parseFloat(Dev.getProperty("Skmag", "1.0"));
					AP_FIG = Float.parseFloat(Dev.getProperty("Apfig", "1.0"));
					CP_MAG = Float.parseFloat(Dev.getProperty("Cpmag", "1.0"));
					M_TK = Float.parseFloat(Dev.getProperty("Mtk", "1.0"));
					ALT_DEV_NO_QUESTS = Boolean.parseBoolean(Dev.getProperty(
							"AltDevNoQuests", "False"));
					ALT_DEV_NO_SPAWNS = Boolean.parseBoolean(Dev.getProperty(
							"AltDevNoSpawns", "False"));
					DEBUG = Boolean.parseBoolean(Dev.getProperty("Debug",
							"False"));
					ASSERT = Boolean.parseBoolean(Dev.getProperty("Assert",
							"False"));
					DEVELOPER = Boolean.parseBoolean(Dev.getProperty(
							"Developer", "False"));
					TEST_SERVER = Boolean.parseBoolean(Dev.getProperty(
							"TestServer", "False"));
					SERVER_LIST_TESTSERVER = Boolean.parseBoolean(Dev
							.getProperty("TestServer", "False"));
					SERVER_LIST_BRACKET = Boolean.parseBoolean(Dev.getProperty(
							"ServerListBrackets", "False"));
					SERVER_LIST_CLOCK = Boolean.parseBoolean(Dev.getProperty(
							"ServerListClock", "False"));
					SERVER_GMONLY = Boolean.parseBoolean(Dev.getProperty(
							"ServerGMOnly", "False"));
				} catch (Exception e) {
					e.printStackTrace();
					throw new Error("Failed to Load " + DEV_CONFIG_FILE
							+ " File.");
				}

				try {
					Properties telnetSettings = new Properties();
					is = new FileInputStream(new File(TELNET_FILE));
					telnetSettings.load(is);

					IS_TELNET_ENABLED = Boolean.parseBoolean(telnetSettings
							.getProperty("EnableTelnet", "False"));
				} catch (Exception e) {
					e.printStackTrace();
					throw new Error("Failed to Load " + TELNET_FILE + " File.");
				}
				try {
					Properties ratesSettings = new Properties();
					is = new FileInputStream(new File(RATES_CONFIG_FILE));
					ratesSettings.load(is);

					RATE_XP = Float.parseFloat(ratesSettings.getProperty(
							"RateXp", "1"));
					RATE_SP = Float.parseFloat(ratesSettings.getProperty(
							"RateSp", "1"));
					RATE_PARTY_XP = Float.parseFloat(ratesSettings.getProperty(
							"RatePartyXp", "1"));
					RATE_PARTY_SP = Float.parseFloat(ratesSettings.getProperty(
							"RatePartySp", "1"));
					RATE_QUESTS_REWARD = Float.parseFloat(ratesSettings
							.getProperty("RateQuestsReward", "1"));
					RATE_DROP_ADENA = Float.parseFloat(ratesSettings
							.getProperty("RateDropAdena", "1"));
					RATE_CONSUMABLE_COST = Float.parseFloat(ratesSettings
							.getProperty("RateConsumableCost", "1"));
					RATE_DROP_ITEMS = Float.parseFloat(ratesSettings
							.getProperty("RateDropItems", "1"));
					RATE_DROP_SPOIL = Float.parseFloat(ratesSettings
							.getProperty("RateDropSpoil", "1"));
					RATE_DROP_MANOR = Integer.parseInt(ratesSettings
							.getProperty("RateDropManor", "1"));
					ITEMS_RAID = Float.parseFloat(ratesSettings.getProperty(
							"ItemsRaid", "1"));
					RATE_DROP_QUEST = Float.parseFloat(ratesSettings
							.getProperty("RateDropQuest", "1"));
					RATE_KARMA_EXP_LOST = Float.parseFloat(ratesSettings
							.getProperty("RateKarmaExpLost", "1"));
					RATE_SIEGE_GUARDS_PRICE = Float.parseFloat(ratesSettings
							.getProperty("RateSiegeGuardsPrice", "1"));
					RATE_DROP_COMMON_HERBS = Float.parseFloat(ratesSettings
							.getProperty("RateCommonHerbs", "15"));
					RATE_DROP_MP_HP_HERBS = Float.parseFloat(ratesSettings
							.getProperty("RateHpMpHerbs", "10"));
					RATE_DROP_GREATER_HERBS = Float.parseFloat(ratesSettings
							.getProperty("RateGreaterHerbs", "4"));
					RATE_DROP_SUPERIOR_HERBS = Float.parseFloat(ratesSettings
							.getProperty("RateSuperiorHerbs", "0.8")) * 10;
					RATE_DROP_SPECIAL_HERBS = Float.parseFloat(ratesSettings
							.getProperty("RateSpecialHerbs", "0.2")) * 10;
					PLAYER_DROP_LIMIT = Integer.parseInt(ratesSettings
							.getProperty("PlayerDropLimit", "3"));
					PLAYER_RATE_DROP = Integer.parseInt(ratesSettings
							.getProperty("PlayerRateDrop", "5"));
					PLAYER_RATE_DROP_ITEM = Integer.parseInt(ratesSettings
							.getProperty("PlayerRateDropItem", "70"));
					PLAYER_RATE_DROP_EQUIP = Integer.parseInt(ratesSettings
							.getProperty("PlayerRateDropEquip", "25"));
					PLAYER_RATE_DROP_EQUIP_WEAPON = Integer
							.parseInt(ratesSettings.getProperty(
									"PlayerRateDropEquipWeapon", "5"));
					PET_XP_RATE = Float.parseFloat(ratesSettings.getProperty(
							"PetXpRate", "1"));
					PET_FOOD_RATE = Integer.parseInt(ratesSettings.getProperty(
							"PetFoodRate", "1"));
					SINEATER_XP_RATE = Float.parseFloat(ratesSettings
							.getProperty("SinEaterXpRate", "1"));
					KARMA_DROP_LIMIT = Integer.parseInt(ratesSettings
							.getProperty("KarmaDropLimit", "10"));
					KARMA_RATE_DROP = Integer.parseInt(ratesSettings
							.getProperty("KarmaRateDrop", "70"));
					KARMA_RATE_DROP_ITEM = Integer.parseInt(ratesSettings
							.getProperty("KarmaRateDropItem", "50"));
					KARMA_RATE_DROP_EQUIP = Integer.parseInt(ratesSettings
							.getProperty("KarmaRateDropEquip", "40"));
					KARMA_RATE_DROP_EQUIP_WEAPON = Integer
							.parseInt(ratesSettings.getProperty(
									"KarmaRateDropEquipWeapon", "10"));
				} catch (Exception e) {
					e.printStackTrace();
					throw new Error("Failed to Load " + RATES_CONFIG_FILE
							+ " File.");
				}
				try {
					Properties EventMods = new Properties();
					is = new FileInputStream(new File(L2J_MODS));
					EventMods.load(is);

					FortressSiege_EVEN_TEAMS = EventMods.getProperty(
							"FortressSiegeEvenTeams", "BALANCE");
					FortressSiege_SAME_IP_PLAYERS_ALLOWED = Boolean
							.parseBoolean(EventMods.getProperty(
									"FortressSiegeSameIPPlayersAllowed",
									"False"));
					FortressSiege_ALLOW_INTERFERENCE = Boolean
							.parseBoolean(EventMods.getProperty(
									"FortressSiegeAllowInterference", "False"));
					FortressSiege_ALLOW_POTIONS = Boolean
							.parseBoolean(EventMods.getProperty(
									"FortressSiegeAllowPotions", "False"));
					FortressSiege_ALLOW_SUMMON = Boolean.parseBoolean(EventMods
							.getProperty("FortressSiegeAllowSummon", "False"));
					FortressSiege_ON_START_REMOVE_ALL_EFFECTS = Boolean
							.parseBoolean(EventMods.getProperty(
									"FortressSiegeOnStartRemoveAllEffects",
									"True"));
					FortressSiege_ON_START_UNSUMMON_PET = Boolean
							.parseBoolean(EventMods.getProperty(
									"FortressSiegeOnStartUnsummonPet", "True"));
					FortressSiege_REVIVE_RECOVERY = Boolean
							.parseBoolean(EventMods.getProperty(
									"FortressSiegeReviveRecovery", "False"));
					FortressSiege_ANNOUNCE_TEAM_STATS = Boolean
							.parseBoolean(EventMods.getProperty(
									"FortressSiegeAnnounceTeamStats", "False"));
					FortressSiege_PRICE_NO_KILLS = Boolean
							.parseBoolean(EventMods.getProperty(
									"FortressSiegePriceNoKills", "False"));
					FortressSiege_JOIN_CURSED = Boolean.parseBoolean(EventMods
							.getProperty("FortressSiegeJoinWithCursedWeapon",
									"True"));

					ALLOW_WEDDING = Boolean.parseBoolean(EventMods.getProperty(
							"AllowWedding", "True"));
					WEDDING_PRICE = Integer.parseInt(EventMods.getProperty(
							"WeddingPrice", "500000"));
					WEDDING_PUNISH_INFIDELITY = Boolean.parseBoolean(EventMods
							.getProperty("WeddingPunishInfidelity", "True"));
					WEDDING_TELEPORT = Boolean.parseBoolean(EventMods
							.getProperty("WeddingTeleport", "True"));
					WEDDING_TELEPORT_PRICE = Integer.parseInt(EventMods
							.getProperty("WeddingTeleportPrice", "500000"));
					WEDDING_TELEPORT_INTERVAL = Integer.parseInt(EventMods
							.getProperty("WeddingTeleportInterval", "120"));
					WEDDING_SAMESEX = Boolean.parseBoolean(EventMods
							.getProperty("WeddingAllowSameSex", "False"));

				} catch (Exception e) {
					e.printStackTrace();
					throw new Error("Failed to Load " + L2J_MODS + " File.");
				}
				try
				{
					Properties L2JCustom = new Properties();
					is = new FileInputStream(new File(L2J_CUSTOM));
					L2JCustom.load(is);

					MANA_POTION_RES = Integer.parseInt(L2JCustom.getProperty("ManaPotionRestoreMp", "200"));
					ELIXIRS_REUSE_DELAY = Integer.parseInt(L2JCustom.getProperty("ElixirsDelay", "300")) * 1000;

					ENABLE_MENU = Boolean.parseBoolean(L2JCustom.getProperty("EnableMenuCmd", "False"));
					ALLOW_WITHDRAW_CWH_CMD = Boolean.parseBoolean(L2JCustom.getProperty("AllowPlayersWithdrawCWH", "False"));

					UNLIM_SHOTS = Boolean.parseBoolean(L2JCustom.getProperty("EnableUnlimitedShots", "False"));

					ENABLE_SIEGE_REWARD = Boolean.parseBoolean(L2JCustom.getProperty("EnableSiegeReward", "False"));
					SIEGE_REWARD_ITEM_ID = Integer.parseInt(L2JCustom.getProperty("SiegeRewardItemId", "4037"));
					SIEGE_REWARD_ITEM_COUNT = Integer.parseInt(L2JCustom.getProperty("SiegeRewardItemCount", "1"));

					OFFLINE_TRADE_ENABLE = Boolean.parseBoolean(L2JCustom.getProperty("OfflineTradeEnable", "False"));
					OFFLINE_CRAFT_ENABLE = Boolean.parseBoolean(L2JCustom.getProperty("OfflineCraftEnable", "False"));
					OFFLINE_SET_NAME_COLOR = Boolean.parseBoolean(L2JCustom.getProperty("OfflineSetNameColor", "False"));
					OFFLINE_NAME_COLOR = Integer.decode("0x" + L2JCustom.getProperty("OfflineNameColor","808080"));
				} 
				catch (Exception e) 
				{
					e.printStackTrace();
					throw new Error("Failed to Load " + L2J_CUSTOM + " File.");
				}
				try 
				{
					Properties Settings = new Properties();
					is = new FileInputStream(HEXID_FILE);
					Settings.load(is);

					SERVER_ID = Integer.parseInt(Settings
							.getProperty("ServerID"));
					HEX_ID = new BigInteger(Settings.getProperty("HexID"), 16)
							.toByteArray();
				} 
				catch (Exception e) 
				{
					_log.warning("Could not load HexID file (" + HEXID_FILE + "). Hopefully login will give us one.");
				}
			}
			finally
			{
				try 
				{
					is.close();
				} 
				catch (Exception e)
				{
				}
			}
		} 
		else if (Server.serverMode == Server.MODE_LOGINSERVER) 
		{
			_log.info("LoginServer: Configs Loaded");
			InputStream is = null;
			try 
			{
				try
				{
					Properties serverSettings = new Properties();
					is = new FileInputStream(new File(LOGIN_CONFIGURATION_FILE));
					serverSettings.load(is);

					GAME_SERVER_LOGIN_HOST = serverSettings.getProperty(
							"LoginHostname", "*");
					GAME_SERVER_LOGIN_PORT = Integer.parseInt(serverSettings
							.getProperty("LoginPort", "9013"));
					LOGIN_BIND_ADDRESS = serverSettings.getProperty(
							"LoginserverHostname", "*");
					PORT_LOGIN = Integer.parseInt(serverSettings.getProperty(
							"LoginserverPort", "2106"));
					DEBUG = Boolean.parseBoolean(serverSettings.getProperty(
							"Debug", "False"));
					DEVELOPER = Boolean.parseBoolean(serverSettings
							.getProperty("Developer", "False"));
					ASSERT = Boolean.parseBoolean(serverSettings.getProperty(
							"Assert", "False"));
					ACCEPT_NEW_GAMESERVER = Boolean.parseBoolean(serverSettings
							.getProperty("AcceptNewGameServer", "True"));
					REQUEST_ID = Integer.parseInt(serverSettings.getProperty(
							"RequestServerID", "0"));
					ACCEPT_ALTERNATE_ID = Boolean.parseBoolean(serverSettings
							.getProperty("AcceptAlternateID", "True"));
					LOGIN_TRY_BEFORE_BAN = Integer.parseInt(serverSettings
							.getProperty("LoginTryBeforeBan", "10"));
					LOGIN_BLOCK_AFTER_BAN = Integer.parseInt(serverSettings
							.getProperty("LoginBlockAfterBan", "600"));
					GM_MIN = Integer.parseInt(serverSettings.getProperty(
							"GMMinLevel", "100"));

					DATAPACK_ROOT = new File(serverSettings.getProperty(
							"DatapackRoot", ".")).getCanonicalFile();
					INTERNAL_HOSTNAME = serverSettings.getProperty(
							"InternalHostname", "localhost");
					EXTERNAL_HOSTNAME = serverSettings.getProperty(
							"ExternalHostname", "localhost");

					DATABASE_DRIVER = serverSettings.getProperty("Driver",
							"com.mysql.jdbc.Driver");
					DATABASE_URL = serverSettings.getProperty("URL",
							"jdbc:mysql://localhost/l2jdb");
					DATABASE_LOGIN = serverSettings
							.getProperty("Login", "root");
					DATABASE_PASSWORD = serverSettings.getProperty("Password",
							"");
					DATABASE_MAX_CONNECTIONS = Integer.parseInt(serverSettings
							.getProperty("MaximumDbConnections", "50"));
					DATABASE_MAXSTATEMENTS = Integer.parseInt(serverSettings
							.getProperty("MaximumStateMents", "100"));
					DATABASE_MIN_POOLSIZE = Integer.parseInt(serverSettings
							.getProperty("MinPoolSize", "50"));
					DATABASE_MAX_POOLSIZE = Integer.parseInt(serverSettings
							.getProperty("MaxPoolSize", "10"));
					DATABASE_AUTO_ANALYZE = Boolean.parseBoolean(serverSettings
							.getProperty("DatabaseAutoAnalyze", "False"));
					DATABASE_AUTO_CHECK = Boolean.parseBoolean(serverSettings
							.getProperty("DatabaseAutoCheck", "False"));
					DATABASE_AUTO_OPTIMIZE = Boolean
							.parseBoolean(serverSettings.getProperty(
									"DatabaseAutoOptimize", "False"));
					DATABASE_AUTO_REPAIR = Boolean.parseBoolean(serverSettings
							.getProperty("DatabaseAutoRepair", "False"));
					DATABASE_ACQUIREINCREMENT = Integer.parseInt(serverSettings
							.getProperty("AquireIncrement", "1"));
					DATABASE_IDLECONNECTIONTEST = Integer
							.parseInt(serverSettings.getProperty(
									"IdleConnectionTest", "10800"));
					DATABASE_MAXIDLETIME = Integer.parseInt(serverSettings
							.getProperty("MaxIdleTime", "0"));

					SHOW_LICENCE = Boolean.parseBoolean(serverSettings
							.getProperty("ShowLicence", "True"));
					IP_UPDATE_TIME = Integer.parseInt(serverSettings
							.getProperty("IpUpdateTime", "0"));
					FORCE_GGAUTH = Boolean.parseBoolean(serverSettings
							.getProperty("ForceGGAuth", "False"));
					AUTO_CREATE_ACCOUNTS = Boolean.parseBoolean(serverSettings
							.getProperty("AutoCreateAccounts", "True"));
					FLOOD_PROTECTION = Boolean.parseBoolean(serverSettings
							.getProperty("EnableFloodProtection", "True"));
					FAST_CONNECTION_LIMIT = Integer.parseInt(serverSettings
							.getProperty("FastConnectionLimit", "15"));
					NORMAL_CONNECTION_TIME = Integer.parseInt(serverSettings
							.getProperty("NormalConnectionTime", "700"));
					FAST_CONNECTION_TIME = Integer.parseInt(serverSettings
							.getProperty("FastConnectionTime", "350"));
					MAX_CONNECTION_PER_IP = Integer.parseInt(serverSettings
							.getProperty("MaxConnectionPerIP", "50"));

					MMO_SELECTOR_SLEEP_TIME = Integer.parseInt(serverSettings
							.getProperty("SleepTime", "20"));
					MMO_IO_SELECTOR_THREAD_COUNT = Integer
							.parseInt(serverSettings.getProperty(
									"IOSelectorThreadCount", "2"));
					MMO_MAX_SEND_PER_PASS = Integer.parseInt(serverSettings
							.getProperty("MaxSendPerPass", "12"));
					MMO_MAX_READ_PER_PASS = Integer.parseInt(serverSettings
							.getProperty("MaxReadPerPass", "12"));
					MMO_HELPER_BUFFER_COUNT = Integer.parseInt(serverSettings
							.getProperty("HelperBufferCount", "20"));
				} catch (Exception e) {
					e.printStackTrace();
					throw new Error("Failed to Load "
							+ LOGIN_CONFIGURATION_FILE + " File.");
				}

				try {
					Properties telnetSettings = new Properties();
					is = new FileInputStream(new File(TELNET_FILE));
					telnetSettings.load(is);
					IS_TELNET_ENABLED = Boolean.parseBoolean(telnetSettings
							.getProperty("EnableTelnet", "False"));
				} catch (Exception e) {
					e.printStackTrace();
					throw new Error("Failed to Load " + TELNET_FILE + " File.");
				}
			} finally {
				try {
					is.close();
				} catch (Exception e) {
				}
			}
		} else
			_log.severe("Could not Load Config: server mode was not set");
	}

	public static boolean setParameterValue(String pName, String pValue) {
		if (pName.equalsIgnoreCase("RateXp"))
			RATE_XP = Float.parseFloat(pValue);
		else if (pName.equalsIgnoreCase("RateSp"))
			RATE_SP = Float.parseFloat(pValue);
		else if (pName.equalsIgnoreCase("RatePartyXp"))
			RATE_PARTY_XP = Float.parseFloat(pValue);
		else if (pName.equalsIgnoreCase("RatePartySp"))
			RATE_PARTY_SP = Float.parseFloat(pValue);
		else if (pName.equalsIgnoreCase("RateQuestsReward"))
			RATE_QUESTS_REWARD = Float.parseFloat(pValue);
		else if (pName.equalsIgnoreCase("RateDropAdena"))
			RATE_DROP_ADENA = Float.parseFloat(pValue);
		else if (pName.equalsIgnoreCase("RateConsumableCost"))
			RATE_CONSUMABLE_COST = Float.parseFloat(pValue);
		else if (pName.equalsIgnoreCase("RateDropItems"))
			RATE_DROP_ITEMS = Float.parseFloat(pValue);
		else if (pName.equalsIgnoreCase("RateDropSpoil"))
			RATE_DROP_SPOIL = Float.parseFloat(pValue);
		else if (pName.equalsIgnoreCase("RateDropManor"))
			RATE_DROP_MANOR = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("LifeCrystalNeeded"))
			LIFE_CRYSTAL_NEEDED = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("ItemsRaid"))
			ITEMS_RAID = Float.parseFloat(pValue);
		else if (pName.equalsIgnoreCase("RateDropQuest"))
			RATE_DROP_QUEST = Float.parseFloat(pValue);
		else if (pName.equalsIgnoreCase("RateKarmaExpLost"))
			RATE_KARMA_EXP_LOST = Float.parseFloat(pValue);
		else if (pName.equalsIgnoreCase("RateSiegeGuardsPrice"))
			RATE_SIEGE_GUARDS_PRICE = Float.parseFloat(pValue);
		else if (pName.equalsIgnoreCase("PlayerDropLimit"))
			PLAYER_DROP_LIMIT = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("PlayerRateDrop"))
			PLAYER_RATE_DROP = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("PlayerRateDropItem"))
			PLAYER_RATE_DROP_ITEM = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("PlayerRateDropEquip"))
			PLAYER_RATE_DROP_EQUIP = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("PlayerRateDropEquipWeapon"))
			PLAYER_RATE_DROP_EQUIP_WEAPON = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("KarmaDropLimit"))
			KARMA_DROP_LIMIT = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("KarmaRateDrop"))
			KARMA_RATE_DROP = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("KarmaRateDropItem"))
			KARMA_RATE_DROP_ITEM = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("KarmaRateDropEquip"))
			KARMA_RATE_DROP_EQUIP = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("KarmaRateDropEquipWeapon"))
			KARMA_RATE_DROP_EQUIP_WEAPON = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("AutoDestroyDroppedItemAfter"))
			AUTODESTROY_ITEM_AFTER = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("DestroyPlayerDroppedItem"))
			DESTROY_DROPPED_PLAYER_ITEM = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("DestroyEquipableItem"))
			DESTROY_EQUIPABLE_PLAYER_ITEM = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("SaveDroppedItem"))
			SAVE_DROPPED_ITEM = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("EmptyDroppedItemTableAfterLoad"))
			EMPTY_DROPPED_ITEM_TABLE_AFTER_LOAD = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("SaveDroppedItemInterval"))
			SAVE_DROPPED_ITEM_INTERVAL = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("ClearDroppedItemTable"))
			CLEAR_DROPPED_ITEM_TABLE = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("PreciseDropCalculation"))
			PRECISE_DROP_CALCULATION = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("MultipleItemDrop"))
			MULTIPLE_ITEM_DROP = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("CoordSynchronize"))
			COORD_SYNCHRONIZE = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("DeleteCharAfterDays"))
			DELETE_DAYS = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("AllowDiscardItem"))
			ALLOW_DISCARDITEM = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AllowFreight"))
			ALLOW_FREIGHT = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AllowWarehouse"))
			ALLOW_WAREHOUSE = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AllowWear"))
			ALLOW_WEAR = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("WearDelay"))
			WEAR_DELAY = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("WearPrice"))
			WEAR_PRICE = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("AllowWater"))
			ALLOW_WATER = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AllowRentPet"))
			ALLOW_RENTPET = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AllowBoat"))
			ALLOW_BOAT = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AllowCursedWeapons"))
			ALLOW_CURSED_WEAPONS = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AllowManor"))
			ALLOW_MANOR = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("BypassValidation"))
			BYPASS_VALIDATION = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("CommunityType"))
			COMMUNITY_TYPE = pValue.toLowerCase();
		else if (pName.equalsIgnoreCase("BBSDefault"))
			BBS_DEFAULT = pValue;
		else if (pName.equalsIgnoreCase("ShowLevelOnCommunityBoard"))
			SHOW_LEVEL_COMMUNITYBOARD = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("ShowStatusOnCommunityBoard"))
			SHOW_STATUS_COMMUNITYBOARD = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("NamePageSizeOnCommunityBoard"))
			NAME_PAGE_SIZE_COMMUNITYBOARD = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("NamePerRowOnCommunityBoard"))
			NAME_PER_ROW_COMMUNITYBOARD = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("ShowNpcLevel"))
			SHOW_NPC_LVL = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("ForceInventoryUpdate"))
			FORCE_INVENTORY_UPDATE = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AutoDeleteInvalidQuestData"))
			AUTODELETE_INVALID_QUEST_DATA = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("MaximumOnlineUsers"))
			MAXIMUM_ONLINE_USERS = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("PacketProtection"))
			ENABLE_PACKET_PROTECTION = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("UnknownPacketsBeforeBan"))
			MAX_UNKNOWN_PACKETS = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("UnknownPacketsPunishment"))
			UNKNOWN_PACKETS_PUNISHMENT = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("ZoneTown"))
			ZONE_TOWN = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("MaximumUpdateDistance"))
			MINIMUM_UPDATE_DISTANCE = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("MinimumUpdateTime"))
			MINIMUN_UPDATE_TIME = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("CheckKnownList"))
			CHECK_KNOWN = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("KnownListForgetDelay"))
			KNOWNLIST_FORGET_DELAY = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("UseDeepBlueDropRules"))
			DEEPBLUE_DROP_RULES = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AllowGuards"))
			ALLOW_GUARDS = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("CancelLesserEffect"))
			EFFECT_CANCELING = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("WyvernSpeed"))
			WYVERN_SPEED = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("StriderSpeed"))
			STRIDER_SPEED = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("MaximumSlotsForNoDwarf"))
			INVENTORY_MAXIMUM_NO_DWARF = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("MaximumSlotsForDwarf"))
			INVENTORY_MAXIMUM_DWARF = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("MaximumSlotsForGMPlayer"))
			INVENTORY_MAXIMUM_GM = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("MaximumWarehouseSlotsForNoDwarf"))
			WAREHOUSE_SLOTS_NO_DWARF = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("MaximumWarehouseSlotsForDwarf"))
			WAREHOUSE_SLOTS_DWARF = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("MaximumWarehouseSlotsForClan"))
			WAREHOUSE_SLOTS_CLAN = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("MaximumFreightSlots"))
			FREIGHT_SLOTS = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("EnchantChanceWeapon"))
			ENCHANT_CHANCE_WEAPON = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("EnchantChanceArmor"))
			ENCHANT_CHANCE_ARMOR = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("EnchantChanceJewelry"))
			ENCHANT_CHANCE_JEWELRY = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("EnchantChanceWeaponCrystal"))
			ENCHANT_CHANCE_WEAPON_CRYSTAL = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("EnchantChanceArmorCrystal"))
			ENCHANT_CHANCE_ARMOR_CRYSTAL = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("EnchantChanceWeaponBlessed"))
			ENCHANT_CHANCE_WEAPON_BLESSED = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("EnchantChanceArmorBlessed"))
			ENCHANT_CHANCE_ARMOR_BLESSED = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("EnchantMaxWeapon"))
			ENCHANT_MAX_WEAPON = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("EnchantMaxArmor"))
			ENCHANT_MAX_ARMOR = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("EnchantMaxJewelry"))
			ENCHANT_MAX_JEWELRY = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("EnchantSafeMax"))
			ENCHANT_SAFE_MAX = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("EnchantSafeMaxFull"))
			ENCHANT_SAFE_MAX_FULL = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("GMOverEnchant"))
			GM_OVER_ENCHANT = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("HpRegenMultiplier"))
			HP_REGEN_MULTIPLIER = Double.parseDouble(pValue);
		else if (pName.equalsIgnoreCase("MpRegenMultiplier"))
			MP_REGEN_MULTIPLIER = Double.parseDouble(pValue);
		else if (pName.equalsIgnoreCase("CpRegenMultiplier"))
			CP_REGEN_MULTIPLIER = Double.parseDouble(pValue);
		else if (pName.equalsIgnoreCase("RaidHpRegenMultiplier"))
			RAID_HP_REGEN_MULTIPLIER = Double.parseDouble(pValue);
		else if (pName.equalsIgnoreCase("RaidMpRegenMultiplier"))
			RAID_MP_REGEN_MULTIPLIER = Double.parseDouble(pValue);
		else if (pName.equalsIgnoreCase("RaidDefenceMultiplier"))
			RAID_DEFENCE_MULTIPLIER = Double.parseDouble(pValue) / 100;
		else if (pName.equalsIgnoreCase("RaidMinionRespawnTime"))
			RAID_MINION_RESPAWN_TIMER = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("StartingAdena"))
			STARTING_ADENA = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("AddLevels"))
			STARTING_LEVEL = Byte.parseByte(pValue);
		else if (pName.equalsIgnoreCase("StartingAA"))
			STARTING_AA = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("UnstuckInterval"))
			UNSTUCK_INTERVAL = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("PlayerSpawnProtection"))
			PLAYER_SPAWN_PROTECTION = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("PlayerFakeDeathUpProtection"))
			PLAYER_FAKEDEATH_UP_PROTECTION = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("PartyXpCutoffMethod"))
			PARTY_XP_CUTOFF_METHOD = pValue;
		else if (pName.equalsIgnoreCase("PartyXpCutoffPercent"))
			PARTY_XP_CUTOFF_PERCENT = Double.parseDouble(pValue);
		else if (pName.equalsIgnoreCase("PartyXpCutoffLevel"))
			PARTY_XP_CUTOFF_LEVEL = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("RespawnRestoreCP"))
			RESPAWN_RESTORE_CP = Double.parseDouble(pValue) / 100;
		else if (pName.equalsIgnoreCase("RespawnRestoreHP"))
			RESPAWN_RESTORE_HP = Double.parseDouble(pValue) / 100;
		else if (pName.equalsIgnoreCase("RespawnRestoreMP"))
			RESPAWN_RESTORE_MP = Double.parseDouble(pValue) / 100;
		else if (pName.equalsIgnoreCase("MaxPvtStoreSlotsDwarf"))
			MAX_PVTSTORE_SLOTS_DWARF = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("MaxPvtStoreSlotsOther"))
			MAX_PVTSTORE_SLOTS_OTHER = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("StoreSkillCooltime"))
			STORE_SKILL_COOLTIME = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AnnounceMammonSpawn"))
			ANNOUNCE_MAMMON_SPAWN = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AltGameTiredness"))
			ALT_GAME_TIREDNESS = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AltGameCreation"))
			ALT_GAME_CREATION = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AltGameCreationSpeed"))
			ALT_GAME_CREATION_SPEED = Double.parseDouble(pValue);
		else if (pName.equalsIgnoreCase("AltGameCreationXpRate"))
			ALT_GAME_CREATION_XP_RATE = Double.parseDouble(pValue);
		else if (pName.equalsIgnoreCase("AltGameCreationSpRate"))
			ALT_GAME_CREATION_SP_RATE = Double.parseDouble(pValue);
		else if (pName.equalsIgnoreCase("AltWeightLimit"))
			ALT_WEIGHT_LIMIT = Double.parseDouble(pValue);
		else if (pName.equalsIgnoreCase("AltBlacksmithUseRecipes"))
			ALT_BLACKSMITH_USE_RECIPES = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AltGameSkillLearn"))
			ALT_GAME_SKILL_LEARN = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("MaxPAtkSpeed"))
			MAX_PATK_SPEED = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("MaxMAtkSpeed"))
			MAX_MATK_SPEED = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("SpBookNeeded"))
			SP_BOOK_NEEDED = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("EnchantSkillSpBookNeeded"))
			ES_SP_BOOK_NEEDED = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("FrontBlow"))
			FRONT_BLOW_SUCCESS = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("BackBlow"))
			BACK_BLOW_SUCCESS = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("SideBlow"))
			SIDE_BLOW_SUCCESS = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("AltGameCancelByHit")) {
			ALT_GAME_CANCEL_BOW = pValue.equalsIgnoreCase("bow")
					|| pValue.equalsIgnoreCase("all");
			ALT_GAME_CANCEL_CAST = pValue.equalsIgnoreCase("cast")
					|| pValue.equalsIgnoreCase("all");
		} else if (pName.equalsIgnoreCase("AltShieldBlocks"))
			ALT_GAME_SHIELD_BLOCKS = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AltPerfectShieldBlockRate"))
			ALT_PERFECT_SHLD_BLOCK = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("Delevel"))
			ALT_GAME_DELEVEL = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("MagicFailures"))
			ALT_GAME_MAGICFAILURES = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AltGameMobAttackAI"))
			ALT_GAME_MOB_ATTACK_AI = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AltMobAgroInPeaceZone"))
			GUARD_ATTACK_AGGRO_MOB = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AltGameExponentXp"))
			ALT_GAME_EXPONENT_XP = Float.parseFloat(pValue);
		else if (pName.equalsIgnoreCase("AltGameExponentSp"))
			ALT_GAME_EXPONENT_SP = Float.parseFloat(pValue);
		else if (pName.equalsIgnoreCase("AllowClassMaster"))
			ALLOW_CLASS_MASTERS = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AltGameFreights"))
			ALT_GAME_FREIGHTS = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AltGameFreightPrice"))
			ALT_GAME_FREIGHT_PRICE = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("AltPartyRange"))
			ALT_PARTY_RANGE = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("AltPartyRange2"))
			ALT_PARTY_RANGE2 = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("CraftingEnabled"))
			IS_CRAFTING_ENABLED = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AutoLoot"))
			AUTO_LOOT = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AutoLootHerbs"))
			AUTO_LOOT_HERBS = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("DisableGradePenalties"))
			DISABLE_GRADE_PENALTIES = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("DisableWeightPenalties"))
			DISABLE_GRADE_PENALTIES = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AltKarmaPlayerCanBeKilledInPeaceZone"))
			ALT_GAME_KARMA_PLAYER_CAN_BE_KILLED_IN_PEACEZONE = Boolean
					.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AltKarmaPlayerCanShop"))
			ALT_GAME_KARMA_PLAYER_CAN_SHOP = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AltKarmaPlayerCanUseGK"))
			ALT_GAME_KARMA_PLAYER_CAN_USE_GK = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AltKarmaPlayerCanTeleport"))
			ALT_GAME_KARMA_PLAYER_CAN_TELEPORT = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AltKarmaPlayerCanTrade"))
			ALT_GAME_KARMA_PLAYER_CAN_TRADE = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AltKarmaPlayerCanUseWareHouse"))
			ALT_GAME_KARMA_PLAYER_CAN_USE_WAREHOUSE = Boolean
					.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AltRequireCastleForDawn"))
			ALT_GAME_REQUIRE_CASTLE_DAWN = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AltRequireClanCastle"))
			ALT_GAME_REQUIRE_CLAN_CASTLE = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AltFreeTeleporting"))
			ALT_GAME_FREE_TELEPORT = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AltSubClassWithoutQuests"))
			ALT_GAME_SUBCLASS_WITHOUT_QUESTS = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AltNewCharAlwaysIsNewbie"))
			ALT_GAME_NEW_CHAR_ALWAYS_IS_NEWBIE = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AltMembersCanWithdrawFromClanWH"))
			ALT_MEMBERS_CAN_WITHDRAW_FROM_CLANWH = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("DwarfRecipeLimit"))
			DWARF_RECIPE_LIMIT = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("CommonRecipeLimit"))
			COMMON_RECIPE_LIMIT = Integer.parseInt(pValue);

		else if (pName.equalsIgnoreCase("AllowWedding"))
			ALLOW_WEDDING = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("WeddingPrice"))
			WEDDING_PRICE = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("WeddingPunishInfidelity"))
			WEDDING_PUNISH_INFIDELITY = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("WeddingTeleport"))
			WEDDING_TELEPORT = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("WeddingTeleportPrice"))
			WEDDING_TELEPORT_PRICE = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("WeddingTeleportInterval"))
			WEDDING_TELEPORT_INTERVAL = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("WeddingAllowSameSex"))
			WEDDING_SAMESEX = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("WeddingFormalWear"))
			WEDDING_FORMALWEAR = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("WeddingDivorceCosts"))
			WEDDING_DIVORCE_COSTS = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("MinKarma"))
			KARMA_MIN_KARMA = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("MaxKarma"))
			KARMA_MAX_KARMA = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("XPDivider"))
			KARMA_XP_DIVIDER = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("BaseKarmaLost"))
			KARMA_LOST_BASE = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("CanGMDropEquipment"))
			KARMA_DROP_GM = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("AwardPKKillPVPPoint"))
			KARMA_AWARD_PK_KILL = Boolean.parseBoolean(pValue);
		else if (pName.equalsIgnoreCase("MinimumPKRequiredToDrop"))
			KARMA_PK_LIMIT = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("PvPVsNormalTime"))
			PVP_NORMAL_TIME = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("PvPVsPvPTime"))
			PVP_PVP_TIME = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("GlobalChat"))
			DEFAULT_GLOBAL_CHAT = pValue;
		else if (pName.equalsIgnoreCase("TradeChat"))
			DEFAULT_TRADE_CHAT = pValue;
		else if (pName.equalsIgnoreCase("TimeOfAttack"))
			FS_TIME_ATTACK = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("TimeOfCoolDown"))
			FS_TIME_COOLDOWN = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("TimeOfEntry"))
			FS_TIME_ENTRY = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("TimeOfWarmUp"))
			FS_TIME_WARMUP = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("NumberOfNecessaryPartyMembers"))
			FS_PARTY_MEMBER_COUNT = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("MenuStyle"))
			GM_ADMIN_MENU_STYLE = pValue;
		else if (pName.equalsIgnoreCase("AugmentationNGSkillChance"))
			AUGMENTATION_NG_SKILL_CHANCE = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("AugmentationNGGlowChance"))
			AUGMENTATION_NG_GLOW_CHANCE = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("AugmentationMidSkillChance"))
			AUGMENTATION_MID_SKILL_CHANCE = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("AugmentationMidGlowChance"))
			AUGMENTATION_MID_GLOW_CHANCE = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("AugmentationHighSkillChance"))
			AUGMENTATION_HIGH_SKILL_CHANCE = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("AugmentationHighGlowChance"))
			AUGMENTATION_HIGH_GLOW_CHANCE = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("AugmentationTopSkillChance"))
			AUGMENTATION_TOP_SKILL_CHANCE = Integer.parseInt(pValue);
		else if (pName.equalsIgnoreCase("AugmentationTopGlowChance"))
			AUGMENTATION_TOP_GLOW_CHANCE = Integer.parseInt(pValue);
		else
			return false;
		return true;
	}

	private static void loadFloodProtectorConfigs(final Properties properties) {
		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_USE_ITEM,
				"UseItem", "4");
		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_ROLL_DICE,
				"RollDice", "42");
		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_FIREWORK,
				"Firework", "42");
		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_ITEM_PET_SUMMON,
				"ItemPetSummon", "16");
		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_HERO_VOICE,
				"HeroVoice", "100");
		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_SUBCLASS,
				"Subclass", "20");
		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_DROP_ITEM,
				"DropItem", "10");
		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_SERVER_BYPASS,
				"ServerBypass", "5");
		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_UNK_PACKETS,
				"UnkPackets", "5");
		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_CRAFT, "Craft",
				"10");
		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_MULTISELL,
				"MultiSell", "30");
		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_WEREHOUSE,
				"Werehouse", "10");
		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_MISC, "Misc", "10");
		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_CHAT, "Chat", "10");
		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_GLOBAL, "Global",
				"500");
		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_TRADE, "Trade",
				"500");
		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_POTION, "Potion",
				"10");
		loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_ENCHANT,
				"Enchant", "10");
	}

	private static void loadFloodProtectorConfig(final Properties properties,
			final FloodProtectorConfig config, final String configString,
			final String defaultInterval) {
		config.FLOOD_PROTECTION_INTERVAL = Integer.parseInt(properties
				.getProperty(StringUtil.concat("FloodProtector", configString,
						"Interval"), defaultInterval));
		config.LOG_FLOODING = Boolean.parseBoolean(properties.getProperty(
				StringUtil
						.concat("FloodProtector", configString, "LogFlooding"),
				"False"));
		config.PUNISHMENT_LIMIT = Integer.parseInt(properties.getProperty(
				StringUtil.concat("FloodProtector", configString,
						"PunishmentLimit"), "0"));
		config.PUNISHMENT_TYPE = properties.getProperty(StringUtil.concat(
				"FloodProtector", configString, "PunishmentType"), "none");
		config.PUNISHMENT_TIME = Integer.parseInt(properties.getProperty(
				StringUtil.concat("FloodProtector", configString,
						"PunishmentTime"), "0"));
	}

	public static void saveHexid(int serverId, String string) {
		Config.saveHexid(serverId, string, HEXID_FILE);
	}

	public static void saveHexid(int serverId, String hexId, String fileName) {
		try {
			Properties hexSetting = new Properties();
			File file = new File(fileName);
			file.createNewFile();
			OutputStream out = new FileOutputStream(file);
			hexSetting.setProperty("ServerID", String.valueOf(serverId));
			hexSetting.setProperty("HexID", hexId);
			hexSetting.store(out, "the hexID to auth into login");
			out.close();
		} catch (Exception e) {
			_log.warning("Failed to save hex id to " + fileName + " File.");
			e.printStackTrace();
		}
	}

	public static void unallocateFilterBuffer() {
		_log.info("Cleaning Chat Filter..");
		FILTER_LIST.clear();
	}
}